Commit 0acb18fe by Jay Zoldak

Merge pull request #2480 from edx/zoldak/increase_lettuce_script_timeout

Increase async script timeout in lettuce acceptance tests
parents 544b4961 a4275e90
...@@ -41,6 +41,7 @@ LOGGER = getLogger(__name__) ...@@ -41,6 +41,7 @@ LOGGER = getLogger(__name__)
LOGGER.info("Loading the lettuce acceptance testing terrain file...") LOGGER.info("Loading the lettuce acceptance testing terrain file...")
MAX_VALID_BROWSER_ATTEMPTS = 20 MAX_VALID_BROWSER_ATTEMPTS = 20
GLOBAL_SCRIPT_TIMEOUT = 20
def get_saucelabs_username_and_key(): def get_saucelabs_username_and_key():
...@@ -106,7 +107,7 @@ def initial_setup(server): ...@@ -106,7 +107,7 @@ def initial_setup(server):
# raise a WebDriverException # raise a WebDriverException
try: try:
world.browser = Browser(browser_driver) world.browser = Browser(browser_driver)
world.browser.driver.set_script_timeout(10) world.browser.driver.set_script_timeout(GLOBAL_SCRIPT_TIMEOUT)
world.visit('/') world.visit('/')
except WebDriverException: except WebDriverException:
...@@ -133,7 +134,7 @@ def initial_setup(server): ...@@ -133,7 +134,7 @@ def initial_setup(server):
**make_saucelabs_desired_capabilities() **make_saucelabs_desired_capabilities()
) )
world.absorb(30, 'IMPLICIT_WAIT') world.absorb(30, 'IMPLICIT_WAIT')
world.browser.set_script_timeout(10) world.browser.set_script_timeout(GLOBAL_SCRIPT_TIMEOUT)
elif world.LETTUCE_SELENIUM_CLIENT == 'grid': elif world.LETTUCE_SELENIUM_CLIENT == 'grid':
world.browser = Browser( world.browser = Browser(
...@@ -142,7 +143,7 @@ def initial_setup(server): ...@@ -142,7 +143,7 @@ def initial_setup(server):
browser=settings.SELENIUM_GRID.get('BROWSER'), browser=settings.SELENIUM_GRID.get('BROWSER'),
) )
world.absorb(30, 'IMPLICIT_WAIT') world.absorb(30, 'IMPLICIT_WAIT')
world.browser.driver.set_script_timeout(10) world.browser.driver.set_script_timeout(GLOBAL_SCRIPT_TIMEOUT)
else: else:
raise Exception("Unknown selenium client '{}'".format(world.LETTUCE_SELENIUM_CLIENT)) raise Exception("Unknown selenium client '{}'".format(world.LETTUCE_SELENIUM_CLIENT))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment