[Bug 32550] New: servicetest.sync_dbus might not be enough in some cases
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Dec 21 16:36:33 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=32550
Summary: servicetest.sync_dbus might not be enough in some
cases
Product: Telepathy
Version: git master
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: gabble
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: jonny.lamb at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
I was using sync_dbus in a mission-control test to make MC spin its mainloop
enough so I could assert one method was not being called before I returned from
a call that had previously been made. However, sync_dbus alone was not enough
as apparently libdbus returns from Ping calls synchronously so it didn't turn
the main loop enough. Calling sync_dbus a few times made it work, but it showed
the test was going to be racy. This is what I did:
# Waste a little time here and there. We can't call sync_dbus
# here because it calls Ping and libdbus returns from Ping
# synchronously and doesn't turn the main loop handle enough.
call_async(q, cd_props, 'Get', cs.CD_IFACE_OP_LIST, 'DispatchOperations')
event = q.expect('dbus-return', method='Get')
This works in my case because there was no other Get method call, but it would
be bad to replace sync_dbus with this as it could grab the dbus method return
from some other call, which is obviously bad.
So, we need a better sync_dbus. Ideas?
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list