[Pkg-telepathy-commits] [telepathy-mission-control-6] 86/280: account-manager/avatar.py: fix race condition by combining expect_many calls

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 4a68477e5e501dc5e5932e1326e36fe964cce940
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Oct 29 13:38:20 2013 +0000

    account-manager/avatar.py: fix race condition by combining expect_many calls
    
    The test account-storage plugin uses GDBus, so its signals have an
    undefined order with respect to MC's dbus-glib signals. We don't
    actually care about the order anyway, so expect them all in one
    big expect_many call.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71001
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 tests/twisted/account-manager/avatar.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/account-manager/avatar.py b/tests/twisted/account-manager/avatar.py
index 8bae300..b31ab97 100644
--- a/tests/twisted/account-manager/avatar.py
+++ b/tests/twisted/account-manager/avatar.py
@@ -162,10 +162,8 @@ def test(q, bus, mc):
                 interface=cs.TEST_DBUS_ACCOUNT_PLUGIN_IFACE,
                 signal='DeferringSetAttribute',
                 args=[account.object_path, 'AvatarMime', '']),
-            )
-    q.expect('dbus-signal', path=account.object_path,
-             interface=cs.ACCOUNT_IFACE_AVATAR, signal='AvatarChanged')
-    q.expect_many(
+            EventPattern('dbus-signal', path=account.object_path,
+                interface=cs.ACCOUNT_IFACE_AVATAR, signal='AvatarChanged'),
             EventPattern('dbus-signal',
                 interface=cs.TEST_DBUS_ACCOUNT_PLUGIN_IFACE,
                 signal='CommittingOne',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list