diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-18 18:35:31 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-18 18:35:31 +0000 |
commit | 8983bec4eb0247b0c7b4e087ee8cc069fa313e38 (patch) | |
tree | 6f1ae22e55edca0d5a42887bb5df99e0b5416c9a | |
parent | f60869df99cb3402582ddaa8347df3bac8c62760 (diff) |
Change sync_dbus back to relying on proxy being a Connectionwip-gdbus
It is a Connection throughout Salut, and using an unimplemented
interface isn't enough to act as a "barrier" on a GDBus service.
-rw-r--r-- | tests/twisted/servicetest.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py index 86212f32..422e868d 100644 --- a/tests/twisted/servicetest.py +++ b/tests/twisted/servicetest.py @@ -576,14 +576,16 @@ def call_async(test, proxy, method, *args, **kw): kw.update({'reply_handler': reply_func, 'error_handler': error_func}) 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') +def sync_dbus(bus, q, conn): + # 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>. + # + # FIXME: Mission Control tests can't use this implementation, they will + # need a version that can operate on a MC object + call_async(q, dbus.Interface(conn, cs.PROPERTIES_IFACE), + 'Get', cs.CONN, 'Status') + q.expect('dbus-return', method='Get') class ProxyWrapper: def __init__(self, object, default, others={}): |