Skip to content

Commit ccff633

Browse files
committed
Set timeouts for all browser actions
1 parent ecae1fe commit ccff633

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simulate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,15 @@ async def load_nbgitpuller_url(
9595
context = await browser.new_context(
9696
extra_http_headers={"Authorization": f"token {token}"}
9797
)
98+
context.set_default_timeout(10 * 60 * 1000)
9899
page = await context.new_page()
99100
targetpath = secrets.token_hex(8)
100101
going_to = nbgitpuller_url.make_fullpath(server.server_url, targetpath)
101102
await page.goto(str(going_to))
102103
expected_final_full_url = str(nbgitpuller_url.make_expectedpath(server.server_url, targetpath))
103104
await page.wait_for_url(expected_final_full_url, timeout=120 * 10 * 1000)
104105
await page.wait_for_load_state("networkidle")
105-
await page.screenshot(path=screenshot_name, timeout=5 * 60 * 1000)
106+
await page.screenshot(path=screenshot_name)
106107
return TimedResult(time.perf_counter() - start_time, None)
107108

108109
async def start_named_server(

0 commit comments

Comments
 (0)