Merge lp:~schwann/camera-app/camera-disable-unstable-test into lp:camera-app

Proposed by Günter Schwann
Status: Merged
Approved by: Omer Akram
Approved revision: 198
Merged at revision: 196
Proposed branch: lp:~schwann/camera-app/camera-disable-unstable-test
Merge into: lp:camera-app
Diff against target: 33 lines (+7/-1)
1 file modified
tests/autopilot/camera_app/tests/test_capture.py (+7/-1)
To merge this branch: bzr merge lp:~schwann/camera-app/camera-disable-unstable-test
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Omer Akram (community) Approve
Review via email: mp+186753@code.launchpad.net

Commit message

Disable test_shoot_button_disable(9 as it is unstable because of a race condition

Description of the change

Disable test_shoot_button_disable(9 as it is unstable because of a race condition
This is a proposal to fix bug #1227373

To post a comment you must log in.
197. By Günter Schwann

Better way to disable the test

Revision history for this message
Omer Akram (om26er) wrote :

LGTM

review: Approve
Revision history for this message
Olivier Tilloy (osomon) wrote :

18 + @unittest.skip("Disabled this failing test due race condition)

A reference to the bug report would have been useful, for when your future self looks at this test again and wonders which race condition you were talking about.

32 + # enable that test once autopilot can handle it

I don’t think that’s a problem in autopilot. It’s the very nature of this test that makes it unreliable.

198. By Günter Schwann

Update comments

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/camera_app/tests/test_capture.py'
--- tests/autopilot/camera_app/tests/test_capture.py 2013-05-28 16:39:40 +0000
+++ tests/autopilot/camera_app/tests/test_capture.py 2013-09-20 12:09:04 +0000
@@ -64,6 +64,9 @@
64 time.sleep(1)64 time.sleep(1)
65 self.assertEquals(one_picture_on_disk, True)65 self.assertEquals(one_picture_on_disk, True)
6666
67 # check that the camera is able to capture another photo
68 self.assertThat(exposure_button.enabled, Eventually(Equals(True)))
69
67 """Tests clicking on the record control and checks if the flash changes70 """Tests clicking on the record control and checks if the flash changes
68 to torch off mode and the recording time appears"""71 to torch off mode and the recording time appears"""
69 @unittest.skipIf(model() != 'Desktop', 'recording not available on device yet')72 @unittest.skipIf(model() != 'Desktop', 'recording not available on device yet')
@@ -138,15 +141,18 @@
138141
139 """Test that the shoot button gets disabled for a while then re-enabled142 """Test that the shoot button gets disabled for a while then re-enabled
140 after shooting"""143 after shooting"""
144 @unittest.skip("Disabled this test due race condition see bug 1227373")
141 def test_shoot_button_disable(self):145 def test_shoot_button_disable(self):
142 exposure_button = self.main_window.get_exposure_button()146 exposure_button = self.main_window.get_exposure_button()
143147
144 # The focus ring should be invisible in the beginning148 # The focus ring should be invisible in the beginning
145 self.assertEquals(exposure_button.enabled, True)149 self.assertThat(exposure_button.enabled, Eventually(Equals(True)))
146150
147 # Now take the picture! (Give it a little time to animate)151 # Now take the picture! (Give it a little time to animate)
148 self.pointing_device.move_to_object(exposure_button)152 self.pointing_device.move_to_object(exposure_button)
149 self.pointing_device.click()153 self.pointing_device.click()
150154
155 # autopilot might check this too late, so the exposure_button.enabled
156 # is True again already before the first check
151 self.assertThat(exposure_button.enabled, Eventually(Equals(False)))157 self.assertThat(exposure_button.enabled, Eventually(Equals(False)))
152 self.assertThat(exposure_button.enabled, Eventually(Equals(True)))158 self.assertThat(exposure_button.enabled, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches