Merge lp:~larsu/indicator-messages/lp1217131 into lp:~indicator-applet-developers/indicator-messages/trunk.13.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 363
Merged at revision: 365
Proposed branch: lp:~larsu/indicator-messages/lp1217131
Merge into: lp:~indicator-applet-developers/indicator-messages/trunk.13.10
Diff against target: 14 lines (+5/-0)
1 file modified
test/test-client.py (+5/-0)
To merge this branch: bzr merge lp:~larsu/indicator-messages/lp1217131
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sebastien Bacher Approve
Review via email: mp+182404@code.launchpad.net

Description of the change

test-client.py: flush GDBusConnection before (potentially) freeing it

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks, that makes sense and seems to work (the issue was not easy to trigger so I can't tell for sure, let's see on the builders)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/test-client.py'
2--- test/test-client.py 2013-03-05 22:54:26 +0000
3+++ test/test-client.py 2013-08-27 14:28:20 +0000
4@@ -63,6 +63,11 @@
5 self.assertMethodCalled('UnregisterApplication', 'test.desktop')
6
7 # ApplicationStoppedRunning is called when the last ref on mmapp is dropped
8+ # Since mmapp is the only thing holding on to a GDBusConnection, the
9+ # connection might get freed before it sends the StoppedRunning
10+ # message. Flush the connection to make sure it is sent.
11+ bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
12+ bus.flush_sync(None)
13 del mmapp
14 self.assertMethodCalled('ApplicationStoppedRunning', 'test.desktop')
15

Subscribers

People subscribed via source and target branches