Merge lp:~sil2100/unity/autopilot_search_app_lens_toggle into lp:unity

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Francis Ginther
Approved revision: no longer in the source branch.
Merged at revision: 3205
Proposed branch: lp:~sil2100/unity/autopilot_search_app_lens_toggle
Merge into: lp:unity
Diff against target: 29 lines (+12/-0)
1 file modified
tests/autopilot/unity/tests/test_search.py (+12/-0)
To merge this branch: bzr merge lp:~sil2100/unity/autopilot_search_app_lens_toggle
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andrea Azzarone (community) Approve
Review via email: mp+152386@code.launchpad.net

Commit message

Add a workaround for bug LP: #1152517 in the test_search autopilot suite. We toggle the dash once before starting any app lens tests

Description of the change

- Problem:

unity.tests.test_search.ApplicationLensSearchTests.test_application_lens_search(basic) fails *always* on the jenkins autopilot builders. Only once, on all machines. I suspect it might be because lenses are not loaded correctly and Super+a is not recognized.

- Fix:

Workaround: for the very first time an app lens search test is executed, toggle the dash and unblock Super+a. It's only temporary until the root cause is not found finally, while until that time we need to have the releases unblocked.

- Tests:

N/A

This branch needs testing if it works-around the problem correctly.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Approving it. We'll continue to work to find the real cause of this problem.

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Let's wait with approving this branch until we get the latest indicator results, since there's a probability that the bug 'fixed itself'? Or something.

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

Network issue during test run caused failure. Reapproving.

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 'tests/autopilot/unity/tests/test_search.py'
2--- tests/autopilot/unity/tests/test_search.py 2013-03-06 09:23:32 +0000
3+++ tests/autopilot/unity/tests/test_search.py 2013-03-08 12:00:30 +0000
4@@ -18,6 +18,11 @@
5
6 import gettext
7
8+# XXX: Ugly workaround for a really annoying bug (LP: #1152517) which breaks
9+# this test suite. So, to workaround, we toggle the dash once before doing any
10+# app lens search tests
11+workaround_lenses_load_done = False
12+
13 class SearchTestsBase(UnityTestCase):
14 """Base class for testing searching in search fields.
15
16@@ -61,6 +66,13 @@
17
18 def setUp(self):
19 super(ApplicationLensSearchTestBase, self).setUp()
20+ # XXX: Temporary workaround for LP: #1152517
21+ global workaround_lenses_load_done
22+ if not workaround_lenses_load_done:
23+ self.unity.dash.ensure_visible()
24+ self.unity.dash.ensure_hidden()
25+ workaround_lenses_load_done = True
26+
27 self.app_lens = self.unity.dash.reveal_application_lens()
28 self.addCleanup(self.unity.dash.ensure_hidden)
29 gettext.install("unity-lens-applications", unicode=True)