Commit 48f41aa8 authored by Łukasz Nowak's avatar Łukasz Nowak

rapid-cdn: c->h: Wait for the long entry to appear

parent d3f0ae25
......@@ -1442,9 +1442,15 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
self.instance_path, '*', 'var', 'log', 'httpd', log_name
))[0]
with open(log_file) as fh:
# sometimes logs appear with a bit of delay, so give it a chance
for _ in range(5):
with open(log_file, 'r') as fh:
line = fh.readlines()[-1]
if re.match(log_regexp, line):
break
time.sleep(0.5)
self.assertRegex(
fh.readlines()[-1],
line,
log_regexp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment