[LDTP-Dev] LDTP v1.7.1 http_proxy/HTTP_PROXY changes impact on client-server cnx

Nouar Garcia-Mardambek Nouar.Garcia at Sun.COM
Tue Oct 13 07:14:12 PDT 2009


Hi ldtp-experts,

I've an application (python / wxpython) that reads a configuration file 
when it launched and set/unset the python environment variables:
HTTP_PROXY/http_proxy to the URL of the http proxy to be used if any is 
defined, or keep a direct connection to the internet.

This application provides a Preferences menu to set the information 
about the http (and https) proxy settings + 2 radio buttons to toggle 
between the two network configurations. The dialog is very similar to 
the Connection Settings in Firefox.

The same function is called when the application is started and when it 
changes the proxy setting in the Preferences menu:
proxy holds the definition of the http proxy URL built up.
os.environ['HTTP_PROXY'] = os.environ['http_proxy'] =  proxy
os.environ['FTP_PROXY'] = os.environ['ftp_proxy'] =  proxy
urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()))

I've written a script A:
1) launch my application with launchapp()
2) change the Connection Settings by calling this menu Preferences
3) go back to the main frame
4) call another dialog that does not deal with the network
5) select a view that uses the proxy set to fetch over the network the 
needed data
6) check if any Error window is showing up, if none call a Quit menu and 
exit the application

On OpenSolaris 2009.06 and ubuntu 9.04 with ldtp 1.7.1,  I've noticed if 
I launch this test in a python script, all the steps are executed as 
expected without any problem. I can run the script in a loop without 
problem.

When this test is launched by pyunit 
(TestSuite/TestCase/TextTestRunner), any additional tests executed 
after, over the same application fail in the call of  
guiexist/waittillguiexist(main_frame): the call pauses for a while and 
after gets the error: *TypeError unpack non-sequence* as a response 
although the application is launched with success.

In my execution environment LDTP_DEBUG is set to 2, am I breaking the 
connection between the server and the client during this test and only 
sys.exit() clean up the situation by closing the sockets ? does 
reinitldtp( ) fix my issue as I don't understand what's really doing ?

Looking forward to your advice, best regards.

nouar.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20091013/13affcea/attachment.htm 


More information about the LDTP-dev mailing list