Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java9
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java30
2 files changed, 19 insertions, 20 deletions
diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
index ba2fd76099..f89c3dd8e7 100644
--- a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
+++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java
@@ -41,7 +41,6 @@ import org.junit.Test;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
public class ModulesTest
@@ -79,8 +78,8 @@ public class ModulesTest
// Check versions
assertThat(System.getProperty("java.version.major"),equalTo("1"));
assertThat(System.getProperty("java.version.minor"),anyOf(equalTo("7"),Matchers.equalTo("8"),Matchers.equalTo("9")));
-
-
+
+
List<String> moduleNames = new ArrayList<>();
for (Module mod : modules)
{
@@ -145,7 +144,7 @@ public class ModulesTest
expected.add("infinispan");
expected.add("jdbc-sessions");
expected.add("nosql");
-
+
ConfigurationAssert.assertContainsUnordered("All Modules",expected,moduleNames);
}
@@ -201,7 +200,7 @@ public class ModulesTest
// Test Env
File homeDir = MavenTestingUtils.getTestResourceDir("dist-home");
File baseDir = testdir.getEmptyDir();
- String cmdLine[] = new String[] { "jetty.version=TEST", "java.version=1.7.0_60" };
+ String cmdLine[] = new String[] { "jetty.version=TEST", "java.version=1.8.0_31" };
// Configuration
CommandLineConfigSource cmdLineSource = new CommandLineConfigSource(cmdLine);
diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java b/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java
index 310e1b5f7c..1f4a6f3ec4 100644
--- a/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java
+++ b/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java
@@ -18,8 +18,6 @@
package org.eclipse.jetty.start;
-import static org.hamcrest.Matchers.*;
-
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -34,6 +32,8 @@ import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
+import static org.hamcrest.Matchers.containsString;
+
/**
* Test bad configuration scenarios.
*/
@@ -44,30 +44,30 @@ public class TestBadUseCases
public static List<Object[]> getCases()
{
List<Object[]> ret = new ArrayList<>();
-
- ret.add(new Object[]{ "http2",
- "Missing referenced dependency: alpn-impl/alpn-1.7.0_01",
- new String[]{"java.version=1.7.0_01"}});
-
- ret.add(new Object[]{ "versioned-modules-too-new",
- "Module [http3] specifies jetty version [10.0] which is newer than this version of jetty [" + RebuildTestResources.JETTY_VERSION + "]",
+
+ ret.add(new Object[]{ "http2",
+ "Missing referenced dependency: alpn-impl/alpn-0.0.0_00",
+ new String[]{"java.version=0.0.0_00"}});
+
+ ret.add(new Object[]{ "versioned-modules-too-new",
+ "Module [http3] specifies jetty version [10.0] which is newer than this version of jetty [" + RebuildTestResources.JETTY_VERSION + "]",
null});
-
+
return ret;
}
-
+
@Rule
public ExpectedException expectedException = ExpectedException.none();
-
+
@Parameter(0)
public String caseName;
-
+
@Parameter(1)
public String expectedErrorMessage;
@Parameter(2)
public String[] commandLineArgs;
-
+
@Test
public void testBadConfig() throws Exception
{
@@ -79,7 +79,7 @@ public class TestBadUseCases
cmdLine.add("jetty.home=" + homeDir.getAbsolutePath());
cmdLine.add("jetty.base=" + baseDir.getAbsolutePath());
// cmdLine.add("--debug");
-
+
if (commandLineArgs != null)
{
for (String arg : commandLineArgs)

Back to the top