[telepathy-mission-control/master] dispatcher/approver-fails.py: remove a race condition

Simon McVittie simon.mcvittie at collabora.co.uk
Thu May 28 09:14:33 PDT 2009


We can't assert that there are no more dispatch operations until the one
we had has signalled Finished.
---
 test/twisted/dispatcher/approver-fails.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/test/twisted/dispatcher/approver-fails.py b/test/twisted/dispatcher/approver-fails.py
index f0cd142..270e25b 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') == []
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list