Merge lp:~osomon/webbrowser-app/racy-ap-test-1456885 into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 1018
Merged at revision: 1026
Proposed branch: lp:~osomon/webbrowser-app/racy-ap-test-1456885
Merge into: lp:webbrowser-app
Diff against target: 21 lines (+2/-2)
1 file modified
tests/autopilot/webbrowser_app/tests/test_suggestions.py (+2/-2)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/racy-ap-test-1456885
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+259569@code.launchpad.net

Commit message

Fix a flaky autopilot test.
On a mobile device with network access, the URL (http://en.wikipedia.org/wiki/Linux) might be rewritten to https://en.m.wikipedia.org/wiki/Linux, thus making the test racy depending on when the check on the webview’s URL is performed.

To post a comment you must log in.
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/webbrowser_app/tests/test_suggestions.py'
--- tests/autopilot/webbrowser_app/tests/test_suggestions.py 2015-05-12 13:40:17 +0000
+++ tests/autopilot/webbrowser_app/tests/test_suggestions.py 2015-05-20 05:46:27 +0000
@@ -90,7 +90,7 @@
90 "Livermorium - Element Information"),90 "Livermorium - Element Information"),
91 ("http://www.rsc.org/periodic-table/element/62/samarium",91 ("http://www.rsc.org/periodic-table/element/62/samarium",
92 "Samarium - Element Information"),92 "Samarium - Element Information"),
93 ("http://en.wikipedia.org/wiki/Linux",93 ("http://test/wiki/Linux",
94 "Linux - Wikipedia, the free encyclopedia"),94 "Linux - Wikipedia, the free encyclopedia"),
95 ("http://doc.qt.io/qt-5/qtqml-index.html",95 ("http://doc.qt.io/qt-5/qtqml-index.html",
96 "Qt QML 5.4 - Qt Documentation")96 "Qt QML 5.4 - Qt Documentation")
@@ -264,7 +264,7 @@
264 self.assert_suggestions_eventually_shown()264 self.assert_suggestions_eventually_shown()
265 self.assertThat(suggestions.count, Eventually(Equals(1)))265 self.assertThat(suggestions.count, Eventually(Equals(1)))
266 entries = suggestions.get_ordered_entries()266 entries = suggestions.get_ordered_entries()
267 url = "http://en.wikipedia.org/wiki/Linux"267 url = "http://test/wiki/Linux"
268 self.pointing_device.click_object(entries[0])268 self.pointing_device.click_object(entries[0])
269 webview = self.main_window.get_current_webview()269 webview = self.main_window.get_current_webview()
270 self.assertThat(webview.url, Eventually(Equals(url)))270 self.assertThat(webview.url, Eventually(Equals(url)))

Subscribers

People subscribed via source and target branches

to status/vote changes: