tadeja commented on code in PR #50598:
URL: https://github.com/apache/arrow/pull/50598#discussion_r3639407316
##########
python/scripts/run_emscripten_tests.py:
##########
@@ -200,19 +207,34 @@ def wait_for_done(self):
class BrowserDriver:
def __init__(self, hostname, port, driver):
+ self.url = f"http://{hostname}:{port}/test.html"
self.driver = driver
- self.driver.get(f"http://{hostname}:{port}/test.html")
+ self.driver.get(self.url)
# Chrome on CI takes longer than locally to compile.
self.driver.set_script_timeout(1200)
def load_pyodide(self, dist_dir):
pass
def load_arrow(self):
- self.execute_python(
- f"import pyodide_js as pjs\n"
- f"await pjs.loadPackage('{PYARROW_WHEEL_PATH.name}')\n"
- )
+ code = (f"import pyodide_js as pjs\n"
+ f"await pjs.loadPackage('{PYARROW_WHEEL_PATH.name}')\n")
+ self.driver.set_script_timeout(300)
+ try:
+ for attempt in range(3):
+ try:
+ return self.execute_python(code)
+ except TimeoutException:
+ if attempt == 2:
+ raise
+ print("Timed out loading PyArrow in browser. Restarting
browser",
+ flush=True)
+ self.restart_browser()
+ finally:
+ self.driver.set_script_timeout(1200)
Review Comment:
Clever point, it is unnecessary after 3rd timeout exception.
I've redone setting of both timeouts (1200s timeout moved to successful path
and 300s timeout now set before every attempt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]