From 7152d93dd05346fdb7dbe1893bff6395f83a79a9 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 20 May 2011 21:38:10 -0400 Subject: [PATCH] Fix test timeout issue. A better method than using time.sleep is needed. Maybe use queue.task_done to detect when event processing has ended? Research time! --- tests/test_stream_handlers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_stream_handlers.py b/tests/test_stream_handlers.py index a475b36..dae4456 100644 --- a/tests/test_stream_handlers.py +++ b/tests/test_stream_handlers.py @@ -104,6 +104,9 @@ class TestHandlers(SleekTest): iq['query'] = 'test2' self.send(iq) + # Give the event queue time to process. + time.sleep(0.1) + # Check that the waiter is no longer registered waiter_exists = self.xmpp.removeHandler('IqWait_test2')