Merge branch 'master' into release-9.3

This commit is contained in:
Joakim Erdfelt 2015-06-12 10:00:23 -07:00
commit 372c0c566f
2 changed files with 19 additions and 20 deletions

View File

@ -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);

View File

@ -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)