Skip to content

Commit 2ab4981

Browse files
committed
test.py: wait more seconds, fail after waiting too long
1 parent 1717761 commit 2ab4981

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ def get_analysis_status(aid):
2626

2727

2828
def expect_url(aid):
29-
for _ in range(60):
29+
for t in range(180):
3030
status = get_analysis_status(aid)
31-
print("{}: {}".format(aid, status["status"]))
31+
print("{}: ({}) {}".format(aid, t, status["status"]))
3232
if status["status"] in ["pending", "in-progress"]:
3333
time.sleep(1)
3434
continue
3535
assert status["status"] == "success"
3636
print("{}: {}".format(aid, json.dumps(status, indent=4)))
3737
assert "hello.example" in status["results"]["urls"]
38+
else:
39+
raise Exception("Analysis took too long")
3840

3941

4042
aid = start_analysis(b"""

0 commit comments

Comments
 (0)