summaryrefslogtreecommitdiffhomepage
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/applications/lang/java.py2
-rw-r--r--test/unit/applications/proto.py4
-rw-r--r--test/unit/check/regex.py13
-rw-r--r--test/unit/utils.py2
4 files changed, 17 insertions, 4 deletions
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(
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:
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
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():