diff --git a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java index e3780be7c3b..8523a38dfdc 100644 --- a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java +++ b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredLastAccessTimeTest.java @@ -19,26 +19,30 @@ package org.eclipse.jetty.server.session; import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory; +import org.eclipse.jetty.toolchain.test.JDK; import org.junit.AfterClass; +import org.junit.Assume; import org.junit.BeforeClass; public class ClusteredLastAccessTimeTest extends AbstractClusteredLastAccessTimeTest { - public static InfinispanTestSupport __testSupport; - - + public static InfinispanTestSupport __testSupport; + @BeforeClass public static void setup () throws Exception { - __testSupport = new InfinispanTestSupport(); - __testSupport.setUseFileStore(true); - __testSupport.setup(); + Assume.assumeFalse(JDK.IS_9); + + __testSupport = new InfinispanTestSupport(); + __testSupport.setUseFileStore(true); + __testSupport.setup(); } @AfterClass public static void teardown () throws Exception { - __testSupport.teardown(); + if (__testSupport != null) + __testSupport.teardown(); } @@ -58,5 +62,4 @@ public class ClusteredLastAccessTimeTest extends AbstractClusteredLastAccessTime factory.setCache(__testSupport.getCache()); return factory; } - } diff --git a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java index e574172302f..a148b22d6a0 100644 --- a/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-infinispan-sessions/src/test/java/org/eclipse/jetty/server/session/ClusteredSessionScavengingTest.java @@ -20,7 +20,9 @@ package org.eclipse.jetty.server.session; import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory; +import org.eclipse.jetty.toolchain.test.JDK; import org.junit.AfterClass; +import org.junit.Assume; import org.junit.BeforeClass; /** @@ -30,12 +32,13 @@ import org.junit.BeforeClass; */ public class ClusteredSessionScavengingTest extends AbstractClusteredSessionScavengingTest { - public static InfinispanTestSupport __testSupport; @BeforeClass public static void setup () throws Exception { + Assume.assumeFalse(JDK.IS_9); + __testSupport = new InfinispanTestSupport(); __testSupport.setUseFileStore(true); __testSupport.setup(); @@ -44,7 +47,8 @@ public class ClusteredSessionScavengingTest extends AbstractClusteredSessionScav @AfterClass public static void teardown () throws Exception { - __testSupport.teardown(); + if (__testSupport != null) + __testSupport.teardown(); }