diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-08-27 14:47:49 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-08-27 14:47:49 +0000 |
commit | 6ded3e619d7308b6eda2bf0928b226378b565d1b (patch) | |
tree | 150556e2eebc6f94f0f33642bae75b71446d6af1 | |
parent | 21c5321683550681ec3557ea76b2550dc4aae8b9 (diff) | |
parent | f2b47b88f70990bf76fe83d45b64477b4db4dffc (diff) | |
download | ayatana-indicator-messages-6ded3e619d7308b6eda2bf0928b226378b565d1b.tar.gz ayatana-indicator-messages-6ded3e619d7308b6eda2bf0928b226378b565d1b.tar.bz2 ayatana-indicator-messages-6ded3e619d7308b6eda2bf0928b226378b565d1b.zip |
test-client.py: flush GDBusConnection before (potentially) freeing it. Fixes: https://bugs.launchpad.net/bugs/1217131.
Approved by PS Jenkins bot, Sebastien Bacher.
-rwxr-xr-x | test/test-client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-client.py b/test/test-client.py index a1d503f..0dbf868 100755 --- a/test/test-client.py +++ b/test/test-client.py @@ -63,6 +63,11 @@ class MessagingMenuTest(dbusmock.DBusTestCase): self.assertMethodCalled('UnregisterApplication', 'test.desktop') # ApplicationStoppedRunning is called when the last ref on mmapp is dropped + # Since mmapp is the only thing holding on to a GDBusConnection, the + # connection might get freed before it sends the StoppedRunning + # message. Flush the connection to make sure it is sent. + bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) + bus.flush_sync(None) del mmapp self.assertMethodCalled('ApplicationStoppedRunning', 'test.desktop') |