diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/util/SPNEGOAuthenticationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/util/SPNEGOAuthenticationTest.java index 094cde1baf8..d16a30d8749 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/util/SPNEGOAuthenticationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/util/SPNEGOAuthenticationTest.java @@ -49,7 +49,6 @@ import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.security.Constraint; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ArgumentsSource; @@ -60,10 +59,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -// Apparently only JDK 11 is able to run these tests. -// See for example: https://bugs.openjdk.java.net/browse/JDK-8202439 -// where apparently the compiler gets the AES CPU instructions wrong. -@DisabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10}) public class SPNEGOAuthenticationTest extends AbstractHttpClientServerTest { private static final Logger LOG = LoggerFactory.getLogger(SPNEGOAuthenticationTest.class); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java index eafe6ddf958..9360e226d4b 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java @@ -47,7 +47,6 @@ import org.eclipse.jetty.util.IO; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -1750,7 +1749,6 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture } @Test - @DisabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10}) public void testShutdown() throws Exception { configureServer(new ReadExactHandler()); @@ -1791,7 +1789,6 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture } @Test - @DisabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10}) public void testChunkedShutdown() throws Exception { configureServer(new ReadExactHandler(4096)); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java index 32a910e787f..a1272d8ea03 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLReadEOFAfterResponseTest.java @@ -34,14 +34,11 @@ import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -// Only in JDK 11 is possible to use SSLSocket.shutdownOutput(). -@DisabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10}) public class SSLReadEOFAfterResponseTest { @Test diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/MultiReleaseJarFileTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/MultiReleaseJarFileTest.java index 2a52bc2251d..8da1f62033a 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/MultiReleaseJarFileTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/MultiReleaseJarFileTest.java @@ -22,7 +22,6 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.util.MultiReleaseJarFile.VersionedJarEntry; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; import static org.hamcrest.MatcherAssert.assertThat; @@ -117,7 +116,6 @@ public class MultiReleaseJarFileTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testClassLoaderJava9() throws Exception { try (URLClassLoader loader = new URLClassLoader(new URL[]{example.toURI().toURL()})) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java index 97fc5bc8de6..1d6851747a7 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java @@ -19,8 +19,6 @@ import java.nio.file.Paths; import org.eclipse.jetty.util.resource.Resource; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.EnabledOnJre; import org.junit.jupiter.api.condition.JRE; import static org.hamcrest.MatcherAssert.assertThat; @@ -176,7 +174,6 @@ public class TypeUtilTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testGetLocationJvmCoreJPMS() { // Class from JVM core @@ -185,29 +182,10 @@ public class TypeUtilTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testGetLocationJavaLangThreadDeathJPMS() { // Class from JVM core String expectedJavaBase = "/java.base"; assertThat(TypeUtil.getLocationOfClass(java.lang.ThreadDeath.class).toASCIIString(), containsString(expectedJavaBase)); } - - @Test - @EnabledOnJre(JRE.JAVA_8) - public void testGetLocationJvmCoreJava8RT() - { - // Class from JVM core - String expectedJavaBase = "/rt.jar"; - assertThat(TypeUtil.getLocationOfClass(String.class).toASCIIString(), containsString(expectedJavaBase)); - } - - @Test - @EnabledOnJre(JRE.JAVA_8) - public void testGetLocationJavaLangThreadDeathJava8RT() - { - // Class from JVM core - String expectedJavaBase = "/rt.jar"; - assertThat(TypeUtil.getLocationOfClass(java.lang.ThreadDeath.class).toASCIIString(), containsString(expectedJavaBase)); - } } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/JrtResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/JrtResourceTest.java index beefe18eb3f..600e75e319c 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/JrtResourceTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/JrtResourceTest.java @@ -18,9 +18,7 @@ import java.net.URI; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.TypeUtil; import org.hamcrest.Matchers; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; import static org.hamcrest.MatcherAssert.assertThat; @@ -31,58 +29,6 @@ import static org.hamcrest.Matchers.startsWith; public class JrtResourceTest { @Test - @DisabledOnJre(JRE.JAVA_8) - @Disabled("Not supported on Java 9+ Module API") - public void testResourceFromUriForString() - throws Exception - { - URI stringLoc = TypeUtil.getLocationOfClass(String.class); - Resource resource = Resource.newResource(stringLoc); - - assertThat(resource.exists(), is(true)); - assertThat(resource.isDirectory(), is(false)); - assertThat(IO.readBytes(resource.getInputStream()).length, Matchers.greaterThan(0)); - assertThat(IO.readBytes(resource.getInputStream()).length, is((int)resource.length())); - assertThat(resource.getWeakETag("-xxx"), startsWith("W/\"")); - assertThat(resource.getWeakETag("-xxx"), endsWith("-xxx\"")); - } - - @Test - @DisabledOnJre(JRE.JAVA_8) - @Disabled("Not supported on Java 9+ Module API") - public void testResourceFromStringForString() - throws Exception - { - URI stringLoc = TypeUtil.getLocationOfClass(String.class); - Resource resource = Resource.newResource(stringLoc.toASCIIString()); - - assertThat(resource.exists(), is(true)); - assertThat(resource.isDirectory(), is(false)); - assertThat(IO.readBytes(resource.getInputStream()).length, Matchers.greaterThan(0)); - assertThat(IO.readBytes(resource.getInputStream()).length, is((int)resource.length())); - assertThat(resource.getWeakETag("-xxx"), startsWith("W/\"")); - assertThat(resource.getWeakETag("-xxx"), endsWith("-xxx\"")); - } - - @Test - @DisabledOnJre(JRE.JAVA_8) - @Disabled("Not supported on Java 9+ Module API") - public void testResourceFromURLForString() - throws Exception - { - URI stringLoc = TypeUtil.getLocationOfClass(String.class); - Resource resource = Resource.newResource(stringLoc.toURL()); - - assertThat(resource.exists(), is(true)); - assertThat(resource.isDirectory(), is(false)); - assertThat(IO.readBytes(resource.getInputStream()).length, Matchers.greaterThan(0)); - assertThat(IO.readBytes(resource.getInputStream()).length, is((int)resource.length())); - assertThat(resource.getWeakETag("-xxx"), startsWith("W/\"")); - assertThat(resource.getWeakETag("-xxx"), endsWith("-xxx\"")); - } - - @Test - @DisabledOnJre(JRE.JAVA_8) public void testResourceModule() throws Exception { @@ -94,7 +40,6 @@ public class JrtResourceTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testResourceAllModules() throws Exception { diff --git a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClassMatcherTest.java b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClassMatcherTest.java index 4ee2cdbcddd..2b4afc9c6a4 100644 --- a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClassMatcherTest.java +++ b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClassMatcherTest.java @@ -25,7 +25,6 @@ import org.eclipse.jetty.webapp.ClassMatcher.Entry; import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.EnabledOnJre; import org.junit.jupiter.api.condition.JRE; @@ -124,7 +123,6 @@ public class ClassMatcherTest @SuppressWarnings("restriction") @Test - @DisabledOnJre(JRE.JAVA_8) public void testIncludedLocations() throws Exception { // jar from JVM classloader @@ -160,7 +158,6 @@ public class ClassMatcherTest @SuppressWarnings("restriction") @Test - @DisabledOnJre(JRE.JAVA_8) public void testIncludedLocationsOrModule() throws Exception { // jar from JVM classloader @@ -199,44 +196,6 @@ public class ClassMatcherTest @SuppressWarnings("restriction") @Test - @EnabledOnJre(JRE.JAVA_8) - public void testExcludeLocations() throws Exception - { - // jar from JVM classloader - URI locString = TypeUtil.getLocationOfClass(String.class); - // System.err.println(locString); - - // a jar from maven repo jar - URI locJunit = TypeUtil.getLocationOfClass(Test.class); - // System.err.println(locJunit); - - // class file - URI locTest = TypeUtil.getLocationOfClass(ClassMatcherTest.class); - // System.err.println(locTest); - - ClassMatcher pattern = new ClassMatcher(); - - // include everything - pattern.include("."); - - assertThat(pattern.match(String.class), Matchers.is(true)); - assertThat(pattern.match(Test.class), Matchers.is(true)); - assertThat(pattern.match(ClassMatcherTest.class), Matchers.is(true)); - - // Add directory for both JVM classes - pattern.exclude(locString.toString()); - - // Add jar for individual class and classes directory - pattern.exclude(locJunit.toString(), locTest.toString()); - - assertThat(pattern.match(String.class), Matchers.is(false)); - assertThat(pattern.match(Test.class), Matchers.is(false)); - assertThat(pattern.match(ClassMatcherTest.class), Matchers.is(false)); - } - - @SuppressWarnings("restriction") - @Test - @DisabledOnJre(JRE.JAVA_8) public void testExcludeLocationsOrModule() throws Exception { // jar from JVM classloader diff --git a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java index 87f0f802165..94da2dd5637 100644 --- a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java +++ b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java @@ -186,7 +186,6 @@ public class DistributionTests extends AbstractJettyHomeTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testSimpleWebAppWithJSPOnModulePath() throws Exception { String jettyVersion = System.getProperty("jettyVersion"); @@ -226,14 +225,12 @@ public class DistributionTests extends AbstractJettyHomeTest } @Test - @DisabledOnJre(JRE.JAVA_8) public void testSimpleWebAppWithJSPOverH2C() throws Exception { testSimpleWebAppWithJSPOverHTTP2(false); } @Test - @DisabledOnJre(JRE.JAVA_8) public void testSimpleWebAppWithJSPOverH2() throws Exception { testSimpleWebAppWithJSPOverHTTP2(true);