diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2011-01-05 14:42:39 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:51:44 -0300 |
commit | e4eaf410aff780efc4e7f5bc693a7b031938d1c5 (patch) | |
tree | 7ffc0f08c77b9018de53b221b990637454809eea /tests/QtNetwork/http_test.py | |
parent | cfeea7ec045c1f9e7d4652ed2f672db2977de3a8 (diff) |
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>
Diffstat (limited to 'tests/QtNetwork/http_test.py')
-rw-r--r-- | tests/QtNetwork/http_test.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/QtNetwork/http_test.py b/tests/QtNetwork/http_test.py index ee6eeea2b..b6bfea5ff 100644 --- a/tests/QtNetwork/http_test.py +++ b/tests/QtNetwork/http_test.py @@ -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 |