[Pkg-telepathy-commits] [telepathy-mission-control-6] 29/90: sync_dbus: work around GNOME #726259
Simon McVittie
smcv at debian.org
Wed May 14 12:09:02 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 cd4d6ab27c9d5a327c4582a246e2629a1a7e3f01
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 18 19:25:00 2014 +0000
sync_dbus: work around GNOME #726259
---
tests/twisted/servicetest.py | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index 86212f3..5af4b09 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -577,13 +577,26 @@ def call_async(test, proxy, method, *args, **kw):
method_proxy(*args, **kw)
def sync_dbus(bus, q, proxy):
- # Dummy D-Bus method call. We can't use DBus.Peer.Ping() because libdbus
- # replies to that message immediately, rather than handing it up to
- # dbus-glib and thence the application, which means that Ping()ing the
- # application doesn't ensure that it's processed all D-Bus messages prior
- # to our ping.
- call_async(q, dbus.Interface(proxy, cs.TESTS), 'DummySyncDBus')
- q.expect('dbus-error', method='DummySyncDBus')
+ # We need to use functionality that is actually implemented by tp-glib,
+ # because unimplemented and built-in functionality in GDBus can jump
+ # the queue. <https://bugzilla.gnome.org/show_bug.cgi?id=726259>
+
+ if proxy.object_path == cs.AM_PATH:
+ call_async(q, dbus.Interface(proxy, cs.PROPERTIES_IFACE),
+ 'Get', cs.AM, 'Interfaces')
+ q.expect('dbus-return', method='Get')
+ elif proxy.object_path.startswith(cs.ACCOUNT_PATH_PREFIX):
+ call_async(q, dbus.Interface(proxy, cs.PROPERTIES_IFACE),
+ 'Get', cs.ACCOUNT, 'Enabled')
+ q.expect('dbus-return', method='Get')
+ elif proxy.object_path.startswith('/' + cs.CONN.replace('.', '/') + '/'):
+ # It could be a Connection or a Channel. Assume it's a Connection
+ # for now, that's what all the CM tests use in practice
+ call_async(q, dbus.Interface(proxy, cs.PROPERTIES_IFACE),
+ 'Get', cs.CONN, 'Status')
+ q.expect('dbus-return', method='Get')
+ else:
+ raise AssertionError("don't know how to sync %s" % proxy.object_path)
class ProxyWrapper:
def __init__(self, object, default, others={}):
--
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