[Telepathy-commits] [telepathy-salut/master] test-two-muc-stream-tubes: ordering of the server-connected and client-connected is not garantee

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Mar 11 09:15:24 PDT 2009


---
 tests/twisted/avahi/test-two-muc-stream-tubes.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/twisted/avahi/test-two-muc-stream-tubes.py b/tests/twisted/avahi/test-two-muc-stream-tubes.py
index 0e23f33..f8712d0 100644
--- a/tests/twisted/avahi/test-two-muc-stream-tubes.py
+++ b/tests/twisted/avahi/test-two-muc-stream-tubes.py
@@ -8,7 +8,7 @@ import errno
 import string
 
 from xmppstream import setup_stream_listener, connect_to_stream
-from servicetest import make_channel_proxy, Event, call_async
+from servicetest import make_channel_proxy, Event, call_async, EventPattern
 
 from twisted.words.xish import xpath, domish
 from twisted.internet.protocol import Factory, Protocol, ClientCreator
@@ -235,9 +235,10 @@ def test(q, bus, conn):
     client.connectUNIX(unix_socket_adr).addCallback(client_connected_cb)
 
     # server got the connection
-    q.expect('server-connected')
+    _, e = q.expect_many(
+        EventPattern('server-connected'),
+        EventPattern('client-connected'))
 
-    e = q.expect('client-connected')
     client_transport = e.transport
 
     e = q.expect('dbus-signal', signal='StreamTubeNewConnection', path=tubes1_path)
-- 
1.5.6.5




More information about the telepathy-commits mailing list