Module: check_mk
Branch: master
Commit: 8ae929310252ff399a533c10ffdb5d85ddcf70dc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ae929310252ff…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 6 13:58:57 2018 +0100
Fix for log rotation wait logic
Change-Id: Icd6a757954641128b3cb31114c3b0e5ab6a63743
---
tests/integration/notifications/test_unreachable_notifications.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/integration/notifications/test_unreachable_notifications.py
b/tests/integration/notifications/test_unreachable_notifications.py
index 9e57c0d..e15ac40 100644
--- a/tests/integration/notifications/test_unreachable_notifications.py
+++ b/tests/integration/notifications/test_unreachable_notifications.py
@@ -105,7 +105,8 @@ def initial_state(site, scenario):
site.live.command("[%d] ROTATE_LOGFILE" % time.time())
def rotated_log():
- return inode_before !=
os.stat(site.path("var/check_mk/core/history")).st_ino
+ return os.path.exists(site.path("var/check_mk/core/history")) \
+ and inode_before !=
os.stat(site.path("var/check_mk/core/history")).st_ino
wait_until(rotated_log, timeout=10)
else: