From d557d3cab0c03801cf8b6b1e145708ce9311c2c9 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 12 Jun 2015 18:46:44 +0200 Subject: [PATCH] Removed JDK 7 references. --- .../org/eclipse/jetty/start/ModulesTest.java | 9 +++--- .../eclipse/jetty/start/TestBadUseCases.java | 30 +++++++++---------- 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 ba2fd760993..f89c3dd8e71 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 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 310e1b5f7ce..1f4a6f3ec4f 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 getCases() { List 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)