recommended exclusion of j11 in Surefire1570ModularFailsafeIT - see similar issue https://issues.apache.org/jira/browse/MJAVADOC-610
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
index 7f7aa69..27f671b 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/HelperAssertions.java
@@ -29,6 +29,7 @@
import java.util.List;
import java.util.Locale;
+import static java.lang.Double.parseDouble;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
@@ -180,15 +181,19 @@
public static void assumeJavaVersion( double expectedVersion )
{
String thisVersion = System.getProperty( "java.specification.version" );
- assumeTrue( "java.specification.version: " + thisVersion,
- Double.parseDouble( thisVersion ) >= expectedVersion );
+ assumeTrue( "java.specification.version: " + thisVersion, parseDouble( thisVersion ) >= expectedVersion );
}
public static void assumeJavaMaxVersion( double expectedMaxVersion )
{
String thisVersion = System.getProperty( "java.specification.version" );
- assumeTrue( "java.specification.version: " + thisVersion,
- Double.parseDouble( thisVersion ) <= expectedMaxVersion );
+ assumeTrue( "java.specification.version: " + thisVersion, parseDouble( thisVersion ) <= expectedMaxVersion );
+ }
+
+ public static void assumeJavaVersionExcluded( double excludedVersion )
+ {
+ String thisVersion = System.getProperty( "java.specification.version" );
+ assumeTrue( "java.specification.version: " + thisVersion, parseDouble( thisVersion ) != excludedVersion );
}
public static String convertUnicodeToUTF8( String unicode )
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1570ModularFailsafeIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1570ModularFailsafeIT.java
index 83d3d08..eb1ff06 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1570ModularFailsafeIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1570ModularFailsafeIT.java
@@ -24,6 +24,7 @@
import org.junit.Test;
import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersionExcluded;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
@@ -39,6 +40,7 @@
public void setUp()
{
assumeJavaVersion( 9d );
+ assumeJavaVersionExcluded( 11d );
}
@Test