[Telepathy-commits] [telepathy-gabble/master] tests/twisted/olpc/olpc-muc-invitation.py: remove race condition between stream-presence and MembersChanged

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:03 PDT 2008


20080526161155-53eee-b03ec4723549fb41076181ade880863f7390dbb7.gz
---
 tests/twisted/olpc/olpc-muc-invitation.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/twisted/olpc/olpc-muc-invitation.py b/tests/twisted/olpc/olpc-muc-invitation.py
index 5754df6..19dd2ba 100644
--- a/tests/twisted/olpc/olpc-muc-invitation.py
+++ b/tests/twisted/olpc/olpc-muc-invitation.py
@@ -104,9 +104,10 @@ def test(q, bus, conn, stream):
     # OK, now accept the invitation
     call_async(q, group_iface, 'AddMembers', [room_self_handle], 'Oh, OK then')
 
-    q.expect('stream-presence', to='chat at conf.localhost/test')
-
-    event = q.expect('dbus-signal', signal='MembersChanged')
+    _, event = q.expect_many(
+        EventPattern('stream-presence', to='chat at conf.localhost/test'),
+        EventPattern('dbus-signal', signal='MembersChanged')
+        )
 
     assert event.args == ['', [], [bob_handle], [],
             [room_self_handle], 0, room_self_handle]
-- 
1.5.6.3




More information about the Telepathy-commits mailing list