summaryrefslogtreecommitdiffhomepage
path: root/test/test_ruby_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-04-09 16:14:42 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-04-09 16:14:42 +0300
commit549f0873c2beed9517fb4006e1f0a63e0019abb3 (patch)
treefc77a4c4b93a333b08e7b7d8ff28248bd8f74ba6 /test/test_ruby_application.py
parentcfcf4da7fab046cf4dad47b499fa44abbc8f62b8 (diff)
downloadunit-549f0873c2beed9517fb4006e1f0a63e0019abb3.tar.gz
unit-549f0873c2beed9517fb4006e1f0a63e0019abb3.tar.bz2
Tests: wait_for_record() introduced.
Diffstat (limited to 'test/test_ruby_application.py')
-rw-r--r--test/test_ruby_application.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py
index e119127f..924fe1ee 100644
--- a/test/test_ruby_application.py
+++ b/test/test_ruby_application.py
@@ -197,7 +197,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+Error in application'),
+ self.wait_for_record(r'\[error\].+Error in application'),
'errors puts',
)
@@ -209,7 +209,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+1234567890'), 'errors puts int'
+ self.wait_for_record(r'\[error\].+1234567890'), 'errors puts int'
)
def test_ruby_application_errors_write(self):
@@ -220,7 +220,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+Error in application'),
+ self.wait_for_record(r'\[error\].+Error in application'),
'errors write',
)
@@ -237,7 +237,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+1234567890'), 'errors write int'
+ self.wait_for_record(r'\[error\].+1234567890'), 'errors write int'
)
def test_ruby_application_at_exit(self):
@@ -250,7 +250,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+At exit called\.'), 'at exit'
+ self.wait_for_record(r'\[error\].+At exit called\.'), 'at exit'
)
def test_ruby_application_header_custom(self):
@@ -309,7 +309,7 @@ class TestRubyApplication(TestApplicationRuby):
self.stop()
self.assertIsNotNone(
- self.search_in_log(r'\[error\].+Failed to run ruby script'),
+ self.wait_for_record(r'\[error\].+Failed to run ruby script'),
'body each error',
)