summaryrefslogtreecommitdiffhomepage
path: root/test/test_java_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-07-02 16:44:08 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-07-02 16:44:08 +0300
commitbcb9048c4663a34d9b29a6b5b8e3da14a4321a96 (patch)
tree44b98f43740e2929aa5be2d54cfb1bd73ff7fee1 /test/test_java_application.py
parent29225c4fc62e2cf8b06ad8507fe64c079c69974a (diff)
downloadunit-bcb9048c4663a34d9b29a6b5b8e3da14a4321a96.tar.gz
unit-bcb9048c4663a34d9b29a6b5b8e3da14a4321a96.tar.bz2
Tests: adjusted inactive interval in Java app for slow hosts.
Diffstat (limited to 'test/test_java_application.py')
-rw-r--r--test/test_java_application.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/test_java_application.py b/test/test_java_application.py
index 5d0350fa..54ae3366 100644
--- a/test/test_java_application.py
+++ b/test/test_java_application.py
@@ -99,12 +99,16 @@ class TestJavaApplication(TestApplicationJava):
def test_java_application_session_active(self):
self.load('session_inactive')
- resp = self.get()
+ resp = self.get(headers={
+ 'X-Interval': '4',
+ 'Host': 'localhost',
+ 'Connection': 'close',
+ })
session_id = resp['headers']['X-Session-Id']
self.assertEqual(resp['status'], 200, 'session init')
self.assertEqual(
- resp['headers']['X-Session-Interval'], '2', 'session interval'
+ resp['headers']['X-Session-Interval'], '4', 'session interval'
)
self.assertLess(
abs(
@@ -147,7 +151,7 @@ class TestJavaApplication(TestApplicationJava):
resp['headers']['X-Session-Id'], session_id, 'session active 2'
)
- time.sleep(1)
+ time.sleep(2)
resp = self.get(
headers={
@@ -164,7 +168,11 @@ class TestJavaApplication(TestApplicationJava):
def test_java_application_session_inactive(self):
self.load('session_inactive')
- resp = self.get()
+ resp = self.get(headers={
+ 'X-Interval': '1',
+ 'Host': 'localhost',
+ 'Connection': 'close',
+ })
session_id = resp['headers']['X-Session-Id']
time.sleep(3)