bdd: Add a timeout to redirect-later with -1 delay.

This commit is contained in:
Florian Bruhin 2015-11-23 21:37:22 +01:00
parent 196d1e95be
commit 9479a50784

View File

@ -61,7 +61,8 @@ def redirect_later():
delay = int(args.get('delay', '1'))
if delay == -1:
_redirect_later_event = threading.Event()
_redirect_later_event.wait()
ok = _redirect_later_event.wait(timeout=30 * 1000)
assert ok
_redirect_later_event = None
else:
time.sleep(delay)