Fixed test that was not working with JDK 11.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-04-10 11:11:31 +02:00
parent e5b84856d2
commit b26817767b
1 changed files with 6 additions and 7 deletions

View File

@ -18,11 +18,6 @@
package org.eclipse.jetty.start; package org.eclipse.jetty.start;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -37,6 +32,10 @@ import org.eclipse.jetty.toolchain.test.TestingDir;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertThat;
public class ModulesTest public class ModulesTest
{ {
private final static String TEST_SOURCE = "<test>"; private final static String TEST_SOURCE = "<test>";
@ -70,8 +69,8 @@ public class ModulesTest
modules.registerAll(); modules.registerAll();
// Check versions // Check versions
assertThat("java.version.platform", args.getProperties().getString("java.version.platform"), // String platformProperty = args.getProperties().getString("java.version.platform");
anyOf(equalTo("8"),equalTo("9"),equalTo( "10" ))); assertThat("java.version.platform", Integer.parseInt(platformProperty), greaterThanOrEqualTo(8));
List<String> moduleNames = new ArrayList<>(); List<String> moduleNames = new ArrayList<>();
for (Module mod : modules) for (Module mod : modules)