summaryrefslogtreecommitdiff
path: root/test/monkey_driver.py
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-09-07 14:53:18 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-09-07 14:53:18 +0100
commit2d87e7ebeacb33836f8c959a00bb059ff3683963 (patch)
treed3cc15c24e46dc668266df7d25df909597ac30c8 /test/monkey_driver.py
parent524965b867e9aaef4ba75d6e077fdfd6c0b88401 (diff)
downloadnetsurf-2d87e7ebeacb33836f8c959a00bb059ff3683963.tar.gz
netsurf-2d87e7ebeacb33836f8c959a00bb059ff3683963.tar.bz2
monkey_driver: Make window-close take timeout=5
In the parallel test we run, it can sometimes take more than a second for the JS compartment of a window to close down. Since that's part of the shutdown of a window, the driver can end up timing out. Default the timeout to 5s for window-close but make it possible to specify in the yaml too. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'test/monkey_driver.py')
-rwxr-xr-xtest/monkey_driver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/monkey_driver.py b/test/monkey_driver.py
index 9d2af0510..7f8a430c0 100755
--- a/test/monkey_driver.py
+++ b/test/monkey_driver.py
@@ -265,8 +265,9 @@ def run_test_step_action_window_close(ctx, step):
tag = step['window']
assert ctx['windows'].get(tag) is not None
win = ctx['windows'].pop(tag)
+ timeout = int(step.get('timeout', 5))
win.kill()
- win.wait_until_dead()
+ win.wait_until_dead(timeout=timeout)
assert not win.alive