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>
This commit is contained in:
Daniel Silverstone 2019-09-07 14:53:18 +01:00
parent 524965b867
commit 2d87e7ebea
1 changed files with 2 additions and 1 deletions

View File

@ -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