From 4404097e05dc71b7ee78ef49c8ba4d0eaf234f85 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 8 Feb 2021 23:32:27 +0000 Subject: Tests: added "--restart" option. Now Unit do not restart after each test by default. --- test/unit/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/utils.py b/test/unit/utils.py index 7a0a3fe5..e80fc469 100644 --- a/test/unit/utils.py +++ b/test/unit/utils.py @@ -47,7 +47,7 @@ def waitforsocket(port): except KeyboardInterrupt: raise - pytest.fail('Can\'t connect to the 127.0.0.1:' + port) + pytest.fail('Can\'t connect to the 127.0.0.1:' + str(port)) def findmnt(): -- cgit From 11f7d833a9bad1fb3f066cee815fe9772bed4875 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 10 Feb 2021 16:34:37 +0000 Subject: Tests: increased timeout in wait_for_record(). --- test/unit/applications/proto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/unit') diff --git a/test/unit/applications/proto.py b/test/unit/applications/proto.py index af05d071..5c400621 100644 --- a/test/unit/applications/proto.py +++ b/test/unit/applications/proto.py @@ -19,8 +19,8 @@ class TestApplicationProto(TestControl): with open(option.temp_dir + '/' + name, 'r', errors='ignore') as f: return re.search(pattern, f.read()) - def wait_for_record(self, pattern, name='unit.log'): - for i in range(50): + def wait_for_record(self, pattern, name='unit.log', wait=150): + for i in range(wait): found = self.search_in_log(pattern, name) if found is not None: -- cgit From af3b6ef37d0d8d4d9e27d77a750419d96e0119bc Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 18 Feb 2021 21:21:55 +0000 Subject: Tests: added regex check. --- test/unit/check/regex.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/unit/check/regex.py (limited to 'test/unit') diff --git a/test/unit/check/regex.py b/test/unit/check/regex.py new file mode 100644 index 00000000..734c0150 --- /dev/null +++ b/test/unit/check/regex.py @@ -0,0 +1,13 @@ +import re +import subprocess + + +def check_regex(unitd): + output = subprocess.check_output( + [unitd, '--version'], stderr=subprocess.STDOUT + ) + + if re.search('--no-regex', output.decode()): + return False + + return True -- cgit From 175ef1c1dbe5a8fb65b1fbb4adb8a56a16b08569 Mon Sep 17 00:00:00 2001 From: "Sergey A. Osokin" Date: Mon, 22 Mar 2021 17:15:12 +0300 Subject: Java: upgrading third-party components. --- test/unit/applications/lang/java.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index b2e17f23..c9c2095e 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -52,7 +52,7 @@ class TestApplicationJava(TestApplicationProto): os.makedirs(classes_path) classpath = ( - option.current_dir + '/build/tomcat-servlet-api-9.0.39.jar' + option.current_dir + '/build/tomcat-servlet-api-9.0.44.jar' ) ws_jars = glob.glob( -- cgit