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

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

parent d3f0ae25
......@@ -1442,10 +1442,16 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
self.instance_path, '*', 'var', 'log', 'httpd', log_name
))[0]
with open(log_file) as fh:
self.assertRegex(
fh.readlines()[-1],
log_regexp)
# 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(
line,
log_regexp)
class TestMasterRequestDomain(HttpFrontendTestCase, TestDataMixin):
......
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