Tests: wait_for_record() introduced.

This commit is contained in:
Andrey Zelenkov
2019-04-09 16:14:42 +03:00
parent cfcf4da7fa
commit 549f0873c2
6 changed files with 59 additions and 85 deletions

View File

@@ -137,7 +137,7 @@ class TestPerlApplication(TestApplicationPerl):
self.stop()
self.assertIsNotNone(
self.search_in_log(r'\[error\].+Error in application'),
self.wait_for_record(r'\[error\].+Error in application'),
'errors print',
)
@@ -226,12 +226,12 @@ class TestPerlApplication(TestApplicationPerl):
self.assertEqual(self.get()['body'], '21', 'body io fake')
self.assertIsNotNone(
self.search_in_log(r'\[error\].+IOFake getline\(\) \$\/ is \d+'),
self.wait_for_record(r'\[error\].+IOFake getline\(\) \$\/ is \d+'),
'body io fake $/ value',
)
self.assertIsNotNone(
self.search_in_log(r'\[error\].+IOFake close\(\) called'),
self.wait_for_record(r'\[error\].+IOFake close\(\) called'),
'body io fake close',
)