summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-10-01 17:36:29 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-01 17:36:29 +0100
commit8422c2452c6c95c5f37280a23acb3d6a06bdffaa (patch)
treec1fb39a69fdd805f4901a97d245d6a1461cfc895
parentaa4925fed2a1b79c1ab7d8429761bd38988f0db6 (diff)
downloadtelepathy-gabble-8422c2452c6c95c5f37280a23acb3d6a06bdffaa.tar.gz
Fix a race in olpc-muc-prop-change.py
AddMembers() returns right away, so if we're going to expect its return we need to expect it at the same time as the other events that occur immediately in response to our calling AddMembers(). This same race was fixed in another OLPC test two years ago (commit 2938d8c). I've checked the rest of the OLPC tests.
-rw-r--r--tests/twisted/olpc/olpc-muc-prop-change.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/twisted/olpc/olpc-muc-prop-change.py b/tests/twisted/olpc/olpc-muc-prop-change.py
index 58a33cac3..b7afacbec 100644
--- a/tests/twisted/olpc/olpc-muc-prop-change.py
+++ b/tests/twisted/olpc/olpc-muc-prop-change.py
@@ -137,14 +137,13 @@ def test(q, bus, conn, stream):
EventPattern('stream-presence', to='chat@conf.localhost/test'),
EventPattern('dbus-signal', signal='MembersChanged',
args=['', [], [bob_handle], [], [room_self_handle],
- 0, cs.GC_REASON_INVITED])
- )
+ 0, cs.GC_REASON_INVITED]),
+ EventPattern('dbus-return', method='AddMembers'),
+ )
# Send presence for own membership of room.
stream.send(make_muc_presence('owner', 'moderator', 'chat@conf.localhost', 'test'))
- q.expect('dbus-return', method='AddMembers')
-
event = q.expect('dbus-signal', signal='MembersChanged')
assert event.args == ['', [room_self_handle], [], [], [], 0, 0]