From 4073e772c43879b210a3499e3880d996628ff7c0 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 4 Nov 2013 17:35:11 +1100 Subject: [PATCH 1/2] Use File.createTempFile for test output directory for RequestTest --- .../test/java/org/eclipse/jetty/server/RequestTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java index c9b38bb495d..46f0fe3ea9b 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java @@ -213,11 +213,12 @@ public class RequestTest @Test public void testMultiPart() throws Exception - { - final File tmpDir = new File (System.getProperty("java.io.tmpdir")); - final File testTmpDir = new File (tmpDir, "reqtest"); + { + final File testTmpDir = File.createTempFile("reqtest", null); + if (testTmpDir.exists()) + testTmpDir.delete(); + testTmpDir.mkdir(); testTmpDir.deleteOnExit(); - assertTrue(testTmpDir.mkdirs()); assertTrue(testTmpDir.list().length == 0); ContextHandler contextHandler = new ContextHandler(); From cafb13ea897b0f2df435dc921c9e53818fba4795 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 4 Nov 2013 17:35:55 +1100 Subject: [PATCH 2/2] HashedSession deIdles itself via getMaxInactiveInterval every time scavenger is run --- .../java/org/eclipse/jetty/server/session/AbstractSession.java | 1 - 1 file changed, 1 deletion(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java index 96db015f21b..d3fb5ab5b21 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSession.java @@ -226,7 +226,6 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI @Override public int getMaxInactiveInterval() { - checkValid(); return (int)(_maxIdleMs/1000); }