Merge lp:~barry/ubuntu-system-image/lp1365646 into lp:~registry/ubuntu-system-image/client

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 276
Proposed branch: lp:~barry/ubuntu-system-image/lp1365646
Merge into: lp:~registry/ubuntu-system-image/client
Diff against target: 44 lines (+23/-0)
2 files modified
NEWS.rst (+1/-0)
systemimage/tests/test_dbus.py (+22/-0)
To merge this branch: bzr merge lp:~barry/ubuntu-system-image/lp1365646
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+234549@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.rst'
--- NEWS.rst 2014-09-12 00:47:44 +0000
+++ NEWS.rst 2014-09-12 20:39:45 +0000
@@ -14,6 +14,7 @@
14 prefix which can be used to set the log level for the D-Bus API methods.14 prefix which can be used to set the log level for the D-Bus API methods.
15 By default, they log at `ERROR` level, but can be set lower for debugging15 By default, they log at `ERROR` level, but can be set lower for debugging
16 purposes. (LP: #1279970)16 purposes. (LP: #1279970)
17 * Don't crash when releasing an unacquired checking lock. (LP: #1365646)
1718
182.3.2 (2014-07-31)192.3.2 (2014-07-31)
19==================20==================
2021
=== modified file 'systemimage/tests/test_dbus.py'
--- systemimage/tests/test_dbus.py 2014-09-11 21:24:47 +0000
+++ systemimage/tests/test_dbus.py 2014-09-12 20:39:45 +0000
@@ -1150,6 +1150,28 @@
1150 # And now there is a command file for the update.1150 # And now there is a command file for the update.
1151 self.assertTrue(os.path.exists(self.command_file))1151 self.assertTrue(os.path.exists(self.command_file))
11521152
1153 def test_lp_1365646(self):
1154 # After an automatic download is complete, we got three DownloadUpdate
1155 # calls with no intervening CheckForUpdate. This causes a crash since
1156 # an unlocked checking lock was released.
1157 self.download_always()
1158 # Do a normal automatic download.
1159 reactor = SignalCapturingReactor('UpdateDownloaded')
1160 reactor.run(self.iface.CheckForUpdate)
1161 self.assertEqual(len(reactor.signals), 1)
1162 # Now, just do a manual DownloadUpdate. We should get an almost
1163 # immediate UpdateDownloaded in response. Nothing actually gets
1164 # downloaded, but the files in the cache are still valid. The bug
1165 # referenced by this method would cause s-i-d to crash, so as long as
1166 # the process still exists after the signal is received, the bug is
1167 # fixed. The crash doesn't actually effect any client behavior! But
1168 # the traceback does show up in the crash reporter.
1169 process = find_dbus_process(SystemImagePlugin.controller.ini_path)
1170 reactor = SignalCapturingReactor('UpdateDownloaded')
1171 reactor.run(self.iface.DownloadUpdate)
1172 self.assertEqual(len(reactor.signals), 1)
1173 self.assertTrue(process.is_running())
1174
11531175
1154class TestDBusGetSet(_TestBase):1176class TestDBusGetSet(_TestBase):
1155 """Test the DBus client's key/value settings."""1177 """Test the DBus client's key/value settings."""

Subscribers

People subscribed via source and target branches