[Telepathy-commits] [telepathy-idle/master] Disconnect in idletest in case the test fails and doesn't disconnect
Jonathon Jongsma
jonathon.jongsma at collabora.co.uk
Mon Feb 16 20:57:42 PST 2009
This theoretically should prevent a failing test to affect the following tests
Also remove a stray mention of gabble. Findings from wjt's review
---
tests/twisted/idletest.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/twisted/idletest.py b/tests/twisted/idletest.py
index f4e4a4d..e4fa737 100644
--- a/tests/twisted/idletest.py
+++ b/tests/twisted/idletest.py
@@ -197,11 +197,16 @@ def exec_test_deferred (funs, params, protocol=None, timeout=None):
# please ignore the POSIX behind the curtain
d.addBoth((lambda *args: os._exit(1)))
- #conn.Disconnect()
+ # force Disconnect in case the test crashed and didn't disconnect
+ # properly. We need to call this async because the BaseIRCServer
+ # class must do something in response to the Disconnect call and if we
+ # call it synchronously, we're blocking ourself from responding to the
+ # quit method.
+ servicetest.call_async(queue, conn, 'Disconnect')
if 'IDLE_TEST_REFDBG' in os.environ:
- # we have to wait that Gabble timeouts so the process is properly
- # exited and refdbg can generates its report
+ # we have to wait for the timeout so the process is properly
+ # exited and refdbg can generate its report
time.sleep(5.5)
except dbus.DBusException, e:
--
1.5.6.5
More information about the telepathy-commits
mailing list