summaryrefslogtreecommitdiff
path: root/test/twisted
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2009-05-28 17:14:33 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2009-05-28 17:14:33 +0100
commite7bff493e6dd9fc54a8385ed0b3540cd30c09b23 (patch)
tree3f48e6947420f7074b32a8fc198664fa0c86fc76 /test/twisted
parent2af00c9bfad5ef58fa07d5296a3be214fffc4d95 (diff)
dispatcher/approver-fails.py: remove a race condition
We can't assert that there are no more dispatch operations until the one we had has signalled Finished.
Diffstat (limited to 'test/twisted')
-rw-r--r--test/twisted/dispatcher/approver-fails.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/twisted/dispatcher/approver-fails.py b/test/twisted/dispatcher/approver-fails.py
index f0cd1429..270e25bd 100644
--- a/test/twisted/dispatcher/approver-fails.py
+++ b/test/twisted/dispatcher/approver-fails.py
@@ -122,6 +122,16 @@ def test(q, bus, mc):
# Empathy rejects the channels
q.dbus_raise(e.message, cs.NOT_AVAILABLE, 'Still drunk', bus=empathy_bus)
+ q.expect_many(
+ EventPattern('dbus-method-call', path=chan.object_path,
+ interface=cs.CHANNEL, method='Close', handled=True),
+ EventPattern('dbus-signal', path=cdo.object_path,
+ interface=cs.CDO, signal='Finished'),
+ EventPattern('dbus-signal', path=cd.object_path,
+ interface=cs.CD_IFACE_OP_LIST,
+ signal='DispatchOperationFinished'),
+ )
+
# Now there are no more active channel dispatch operations
assert cd_props.Get(cs.CD_IFACE_OP_LIST, 'DispatchOperations') == []