Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #148 from edx/benp/improve-browser-instantiation
Browse files Browse the repository at this point in the history
Make browser instantiation more resilient.
  • Loading branch information
Ben Patterson committed Apr 24, 2016
2 parents b0c8186 + b5ad053 commit 3fd7f24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bok_choy/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ def browser_check_func():
return False, None

browser_instance = Promise(
browser_check_func, "Browser is instantiated successfully.", try_limit=3).fulfill()
# There are cases where selenium takes 30s to return with a failure, so in order to try 3
# times, we set a long timeout. If there is a hang on the first try, the timeout will
# be enforced.
browser_check_func, "Browser is instantiated successfully.", try_limit=3, timeout=95).fulfill()

return browser_instance

Expand Down

0 comments on commit 3fd7f24

Please sign in to comment.