[Telepathy-commits] [telepathy-gabble/master] accept-private-dbus-tube: break one more race
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Mar 5 07:39:04 PST 2009
---
tests/twisted/tubes/accept-private-dbus-tube.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/tests/twisted/tubes/accept-private-dbus-tube.py b/tests/twisted/tubes/accept-private-dbus-tube.py
index 83b6fbb..6607e29 100644
--- a/tests/twisted/tubes/accept-private-dbus-tube.py
+++ b/tests/twisted/tubes/accept-private-dbus-tube.py
@@ -123,17 +123,13 @@ def test(q, bus, conn, stream, bytestream_cls):
assert len(tube) == 1
# Init the bytestream
- events, _ = bytestream.open_bytestream([EventPattern('dbus-return', method='AcceptDBusTube')])
- return_event = events[0]
+ events, _ = bytestream.open_bytestream([EventPattern('dbus-return', method='AcceptDBusTube')],
+ [EventPattern('dbus-signal', signal='TubeStateChanged', args=[69, 2])])
+ return_event = events[0]
address = return_event.value[0]
assert len(address) > 0
- event = q.expect('dbus-signal', signal='TubeStateChanged',
- args=[69, 2]) # 2 == OPEN
- id = event.args[0]
- state = event.args[1]
-
# OK, now let's try to accept a D-Bus tube using the new API
bytestream = bytestream_cls(stream, q, 'gamma', bob_full_jid,
self_full_jid, True)
--
1.5.6.5
More information about the telepathy-commits
mailing list