diff --git a/tests/pom.xml b/tests/pom.xml index 6eac047ab2f..56a34b1eb7e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -67,5 +67,6 @@ test-quickstart test-jmx test-http-client-transport + test-modules diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/JettyDistro.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/JettyDistro.java index b523e9bf398..299be625e9c 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/JettyDistro.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/JettyDistro.java @@ -56,6 +56,7 @@ import org.eclipse.jetty.toolchain.test.JAR; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.toolchain.test.PathAssert; import org.eclipse.jetty.toolchain.test.jupiter.WorkDir; +import org.junit.jupiter.api.Assertions; /** @@ -315,19 +316,15 @@ public class JettyDistro // The actual jetty-distribution-${version} directory is under this directory. // Lets find it. - File subdirs[] = distroUnpackDir.listFiles(new FileFilter() - { - @Override - public boolean accept(File path) + File subdirs[] = distroUnpackDir.listFiles( path -> { if (!path.isDirectory()) { return false; } - return path.getName().startsWith(artifactName + "-"); } - }); + ); if (subdirs.length == 0) { @@ -550,7 +547,7 @@ public class JettyDistro if (cmdLine == null || !cmdLine.contains("XmlConfiguration")) { - fail("Unable to get Jetty command line"); + Assertions.fail( "Unable to get Jetty command line"); } // Need to breakdown commandline into parts, as spaces in command line will cause failures. @@ -595,7 +592,7 @@ public class JettyDistro catch (InterruptedException e) { pid.destroy(); - fail("Unable to get required information within time limit"); + Assertions.fail( "Unable to get required information within time limit"); } } @@ -804,7 +801,7 @@ public class JettyDistro } } - fail("Unable to find java bin"); + Assertions.fail( "Unable to find java bin"); return "java"; } diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java index d47cc4380db..a612e6592e7 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java @@ -49,7 +49,7 @@ import org.junit.jupiter.api.Disabled; public class TestableJettyServer { private List _xmlConfigurations; - private final Map _properties = new HashMap(); + private final Map _properties = new HashMap<>(); private Server _server; private int _serverPort; private String _scheme = HttpScheme.HTTP.asString(); @@ -60,7 +60,7 @@ public class TestableJettyServer public TestableJettyServer() throws IOException { - _xmlConfigurations = new ArrayList(); + _xmlConfigurations = new ArrayList<>(); Properties properties = new Properties(); /* Establish Popular Directories */