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
1=== modified file 'tests/autopilot/camera_app/tests/test_capture.py'
2--- tests/autopilot/camera_app/tests/test_capture.py 2013-05-28 16:39:40 +0000
3+++ tests/autopilot/camera_app/tests/test_capture.py 2013-09-20 12:09:04 +0000
4@@ -64,6 +64,9 @@
5 time.sleep(1)
6 self.assertEquals(one_picture_on_disk, True)
7
8+ # check that the camera is able to capture another photo
9+ self.assertThat(exposure_button.enabled, Eventually(Equals(True)))
10+
11 """Tests clicking on the record control and checks if the flash changes
12 to torch off mode and the recording time appears"""
13 @unittest.skipIf(model() != 'Desktop', 'recording not available on device yet')
14@@ -138,15 +141,18 @@
15
16 """Test that the shoot button gets disabled for a while then re-enabled
17 after shooting"""
18+ @unittest.skip("Disabled this test due race condition see bug 1227373")
19 def test_shoot_button_disable(self):
20 exposure_button = self.main_window.get_exposure_button()
21
22 # The focus ring should be invisible in the beginning
23- self.assertEquals(exposure_button.enabled, True)
24+ self.assertThat(exposure_button.enabled, Eventually(Equals(True)))
25
26 # Now take the picture! (Give it a little time to animate)
27 self.pointing_device.move_to_object(exposure_button)
28 self.pointing_device.click()
29
30+ # autopilot might check this too late, so the exposure_button.enabled
31+ # is True again already before the first check
32 self.assertThat(exposure_button.enabled, Eventually(Equals(False)))
33 self.assertThat(exposure_button.enabled, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches