Fixed QtNetwork test to use '127.0.0.1' instead of 'localhost'

This is necessary to make all test to be able run on any buildbot machine.
Fix Http server shutdown sequence to avoid deadlocks.

Fixes bug #587

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
Renato Araujo Oliveira Filho 2011-01-05 14:42:39 -03:00 committed by Hugo Parente Lima
commit e4eaf410af
3 changed files with 29 additions and 14 deletions

View file

@ -16,18 +16,24 @@ class HttpSignalsCase(UsesQCoreApplication):
super(HttpSignalsCase, self).setUp()
self.httpd = TestServer()
self.httpd.start()
self.http = QHttp('localhost' , self.httpd.port())
self.http = QHttp("127.0.0.1" , self.httpd.port())
self.called = False
def tearDown(self):
self.httpd.shutdown()
if self.httpd:
self.httpd.shutdown()
del self.httpd
self.http = None
self.httpd = None
super(HttpSignalsCase, self).tearDown()
def goAway(self):
self.httpd.shutdown()
self.app.quit()
def callback(self, ident):
self.called = True
self.app.quit()
self.goAway()
def testDefaultArgs(self):
#QHttp signal requestStarted signal