From bcb9048c4663a34d9b29a6b5b8e3da14a4321a96 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Tue, 2 Jul 2019 16:44:08 +0300 Subject: Tests: adjusted inactive interval in Java app for slow hosts. --- test/java/session_inactive/app.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/java/session_inactive') 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()); -- cgit