Merge lp:~roadmr/selenium-simple-test/add-timeout-to-firefoxbinary into lp:selenium-simple-test

Proposed by Daniel Manrique
Status: Needs review
Proposed branch: lp:~roadmr/selenium-simple-test/add-timeout-to-firefoxbinary
Merge into: lp:selenium-simple-test
Diff against target: 22 lines (+2/-2)
1 file modified
src/sst/browsers.py (+2/-2)
To merge this branch: bzr merge lp:~roadmr/selenium-simple-test/add-timeout-to-firefoxbinary
Reviewer Review Type Date Requested Status
Matt Goodall (community) Approve
Canonical ISD QA Team Pending
Review via email: mp+291526@code.launchpad.net

Commit message

Add the timeout parameter to FirefoxBinary.

Newer versions of Selenium pass this parameter so SST's override of FirefoxBinary now breaks without it.

Description of the change

Add the timeout parameter to FirefoxBinary.

Newer versions of Selenium pass this parameter so SST's override of FirefoxBinary now breaks without it.

To post a comment you must log in.
441. By Daniel Manrique

Add the timeout parameter to FirefoxBinary.

Newer versions of Selenium pass this parameter so SST's override of FirefoxBinary now breaks without it.

Revision history for this message
Matt Goodall (matt-goodall) wrote :

lgtm, but with the most pedantic and optional comment of my Canonical career to date :)

review: Approve

Unmerged revisions

441. By Daniel Manrique

Add the timeout parameter to FirefoxBinary.

Newer versions of Selenium pass this parameter so SST's override of FirefoxBinary now breaks without it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sst/browsers.py'
2--- src/sst/browsers.py 2015-04-14 22:23:38 +0000
3+++ src/sst/browsers.py 2016-04-11 15:27:58 +0000
4@@ -143,7 +143,7 @@
5 # available in a FirefoxBinary class
6 return self.process.communicate()[0]
7
8- def _wait_until_connectable(self):
9+ def _wait_until_connectable(self, timeout=30):
10 """Blocks until the extension is connectable in the firefox.
11
12 The base class implements this by checking utils.is_connectable() every
13@@ -154,8 +154,8 @@
14 firefox).
15 """
16 connectable = False
17- max_tries = 6
18 sleep_for = 1
19+ max_tries = int(timeout / sleep_for)
20 for count in range(1, max_tries):
21 connectable = utils.is_connectable(self.profile.port)
22 if connectable:

Subscribers

People subscribed via source and target branches