From e7bff493e6dd9fc54a8385ed0b3540cd30c09b23 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 28 May 2009 17:14:33 +0100 Subject: 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. --- test/twisted/dispatcher/approver-fails.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/twisted') 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') == [] -- cgit v1.2.3