Tests: unit_stop() removed where possible.
Since wait_for_record() was introduced there is no need to stop Unit before parsing unit.log.
This commit is contained in:
@@ -5,7 +5,6 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from conftest import unit_stop
|
||||
from unit.applications.lang.python import TestApplicationPython
|
||||
from unit.option import option
|
||||
|
||||
@@ -157,8 +156,6 @@ custom-header: BLAH
|
||||
|
||||
self.conf({"listeners": {}, "applications": {}})
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert (
|
||||
self.wait_for_record(r'RuntimeError') is not None
|
||||
), 'ctx iter atexit'
|
||||
@@ -337,8 +334,6 @@ Connection: close
|
||||
|
||||
self.conf({"listeners": {}, "applications": {}})
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert self.wait_for_record(r'At exit called\.') is not None, 'atexit'
|
||||
|
||||
def test_python_process_switch(self):
|
||||
@@ -496,8 +491,6 @@ last line: 987654321
|
||||
|
||||
self.get()
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert (
|
||||
self.wait_for_record(r'\[error\].+Error in application\.')
|
||||
is not None
|
||||
@@ -537,8 +530,6 @@ last line: 987654321
|
||||
|
||||
self.get()
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert self.wait_for_record(r'Close called\.') is not None, 'close'
|
||||
|
||||
def test_python_application_close_error(self):
|
||||
@@ -546,8 +537,6 @@ last line: 987654321
|
||||
|
||||
self.get()
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert (
|
||||
self.wait_for_record(r'Close called\.') is not None
|
||||
), 'close error'
|
||||
@@ -557,8 +546,6 @@ last line: 987654321
|
||||
|
||||
self.get()
|
||||
|
||||
unit_stop()
|
||||
|
||||
assert (
|
||||
self.wait_for_record(
|
||||
r'\[error\].+the application returned not an iterable object'
|
||||
|
||||
Reference in New Issue
Block a user