← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:html5browser-intermittent-test-failure into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:html5browser-intermittent-test-failure into launchpad:master.

Commit message:
Fix intermittent failure in html5browser tests

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406038

On buildbot, test_load_page_set_window_status_incremental_timeout often hit the initial timeout (previously set to one second) before getting round to producing any incremental information.  Set the initial timeout (and indeed the main timeout) to 30 seconds to make this more reliable.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:html5browser-intermittent-test-failure into launchpad:master.
diff --git a/lib/lp/testing/tests/test_html5browser.py b/lib/lp/testing/tests/test_html5browser.py
index 2345e16..a512329 100644
--- a/lib/lp/testing/tests/test_html5browser.py
+++ b/lib/lp/testing/tests/test_html5browser.py
@@ -197,7 +197,9 @@ class BrowserTestCase(TestCase):
         self.file.write(incremental_timeout_page)
         self.file.flush()
         browser = Browser()
-        command = browser.load_page(self.file.name, timeout=1000)
+        command = browser.load_page(
+            self.file.name, timeout=30000, initial_timeout=30000,
+            incremental_timeout=1000)
         self.assertEqual(Command.STATUS_COMPLETE, command.status)
         self.assertEqual(Command.CODE_FAIL, command.return_code)
         self.assertEqual('shazam', command.content)