diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-07-02 16:44:08 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-07-02 16:44:08 +0300 |
commit | bcb9048c4663a34d9b29a6b5b8e3da14a4321a96 (patch) | |
tree | 44b98f43740e2929aa5be2d54cfb1bd73ff7fee1 /test/java | |
parent | 29225c4fc62e2cf8b06ad8507fe64c079c69974a (diff) | |
download | unit-bcb9048c4663a34d9b29a6b5b8e3da14a4321a96.tar.gz unit-bcb9048c4663a34d9b29a6b5b8e3da14a4321a96.tar.bz2 |
Tests: adjusted inactive interval in Java app for slow hosts.
Diffstat (limited to 'test/java')
-rw-r--r-- | test/java/session_inactive/app.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/java/session_inactive/app.java b/test/java/session_inactive/app.java index f338fc89..618e4d67 100644 --- a/test/java/session_inactive/app.java +++ b/test/java/session_inactive/app.java @@ -17,7 +17,13 @@ public class app extends HttpServlet HttpSession s = request.getSession(); if (s.isNew()) { - s.setMaxInactiveInterval(2); + String interval = request.getHeader("X-Interval"); + + if (interval == null) { + s.setMaxInactiveInterval(0); + } else { + s.setMaxInactiveInterval(Integer.parseInt(interval)); + } } response.addHeader("X-Session-Id", s.getId()); |