Module: check_mk
Branch: master
Commit: af24b43f189b2275ee7b3a2f939ff651b477abff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=af24b43f189b22…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 6 10:02:46 2019 +0100
Fixed race condition in bulk discovery web API tests
Change-Id: I1325a11b3ed7dff452bf45d2a00755c9415ee514
---
tests/integration/cmk/gui/test_webapi.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/integration/cmk/gui/test_webapi.py
b/tests/integration/cmk/gui/test_webapi.py
index 35847a7..055fa57 100644
--- a/tests/integration/cmk/gui/test_webapi.py
+++ b/tests/integration/cmk/gui/test_webapi.py
@@ -558,7 +558,8 @@ def test_bulk_discovery_unknown_host(web):
def _wait_for_bulk_discovery_job(web):
def job_completed():
- return web.bulk_discovery_status()["is_running"] is False
+ status = web.bulk_discovery_status()
+ return status["job"]["state"] != "initialized" and
status["is_running"] is False
wait_until(job_completed, timeout=15, interval=1)