You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2023/03/17 16:52:22 UTC
[cxf] 09/12: Reduce the session timouts so test doesn't sit there doing nothing for 30 seconds
This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 9c19cb8a5912ef62ae730c5d7aa385168762e637
Author: Daniel Kulp <da...@kulp.com>
AuthorDate: Fri Mar 17 07:45:00 2023 -0400
Reduce the session timouts so test doesn't sit there doing nothing for 30 seconds
---
.../test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java | 2 +-
.../src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java | 2 ++
.../src/test/resources/org/apache/cxf/systest/http/SessionServer.xml | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
index bc8fce1038..d59d25261d 100644
--- a/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
@@ -115,7 +115,7 @@ public class ClientServerSessionTest extends AbstractBusClientServerTestBase {
assertTrue(cookie.contains("a=a"));
assertTrue(cookie.contains("b=b"));
- Thread.sleep(30 * 1000); //let session expire
+ Thread.sleep(5 * 1000); //let session expire
greeting = greeter.greetMe("SessionExpire");
cookie = "";
if (greeting.indexOf(';') != -1) {
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java b/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
index b3c00bd5b2..f92b58b0bb 100644
--- a/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
@@ -75,6 +75,7 @@ public class GreeterSessionImpl implements Greeter {
if (name == null) {
name = me;
LOG.info("Starting the Session");
+ session.setMaxInactiveInterval(1);
}
session.setAttribute("name", me);
@@ -117,6 +118,7 @@ public class GreeterSessionImpl implements Greeter {
if (name == null) {
name = me;
LOG.info("Starting the Session");
+ session.setMaxInactiveInterval(1);
}
session.setAttribute("name", me);
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/http/SessionServer.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/http/SessionServer.xml
index b4a84cf0d7..af0c009ebe 100644
--- a/systests/transports/src/test/resources/org/apache/cxf/systest/http/SessionServer.xml
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/http/SessionServer.xml
@@ -28,7 +28,7 @@
<httpj:engine-factory bus="cxf">
<httpj:engine port="${testutil.ports.SessionServer}">
<httpj:sessionSupport>true</httpj:sessionSupport>
- <httpj:sessionTimeout>20</httpj:sessionTimeout>
+ <httpj:sessionTimeout>10</httpj:sessionTimeout>
<httpj:reuseAddress>false</httpj:reuseAddress>
</httpj:engine>
</httpj:engine-factory>