diff --git a/spring-core/src/test/java/org/springframework/tests/TestGroup.java b/spring-core/src/test/java/org/springframework/tests/TestGroup.java index 9556e5faa4..c135e8e68a 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestGroup.java +++ b/spring-core/src/test/java/org/springframework/tests/TestGroup.java @@ -59,8 +59,14 @@ public enum TestGroup { /** * Tests that should only be run on the continuous integration server. */ - CI; + CI, + /** + * Tests that require custom compilation beyond that of the standard JDK. This helps to + * allow running tests that will otherwise fail when using JDK > 1.8 b88. See + * SPR-10558 + */ + CUSTOM_COMPILATION; /** * Parse the specified comma separates string of groups. diff --git a/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java b/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java index d095b25ffb..2d519345f2 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java +++ b/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java @@ -64,7 +64,7 @@ public class TestGroupTests { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Unable to find test group 'missing' when parsing " + "testGroups value: 'performance, missing'. Available groups include: " + - "[LONG_RUNNING,PERFORMANCE,JMXMP,CI]"); + "[LONG_RUNNING,PERFORMANCE,JMXMP,CI,CUSTOM_COMPILATION]"); TestGroup.parse("performance, missing"); } diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java index 7e2b72ba12..14ab19c9c0 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java @@ -20,11 +20,13 @@ import java.io.StringWriter; import javax.xml.transform.stream.StreamResult; import org.custommonkey.xmlunit.XMLUnit; -import org.junit.Ignore; +import org.junit.BeforeClass; import org.junit.Test; import org.springframework.oxm.AbstractMarshallerTests; import org.springframework.oxm.Marshaller; +import org.springframework.tests.Assume; +import org.springframework.tests.TestGroup; import static org.custommonkey.xmlunit.XMLAssert.*; import static org.junit.Assert.assertFalse; @@ -36,9 +38,13 @@ import static org.junit.Assert.assertTrue; * NOTE: These tests fail under Eclipse/IDEA because JiBX binding does * not occur by default. The Gradle build should succeed, however. */ -@Ignore("INCOMPATIBLE WITH OPENJDK 8 b89+") public class JibxMarshallerTests extends AbstractMarshallerTests { + @BeforeClass + public static void compilerAssumptions() { + Assume.group(TestGroup.CUSTOM_COMPILATION); + } + @Override protected Marshaller createMarshaller() throws Exception { JibxMarshaller marshaller = new JibxMarshaller(); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxUnmarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxUnmarshallerTests.java index 6d881cf6b4..b1e460d835 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxUnmarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxUnmarshallerTests.java @@ -20,10 +20,13 @@ import java.io.ByteArrayInputStream; import javax.xml.transform.stream.StreamSource; +import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.springframework.oxm.AbstractUnmarshallerTests; import org.springframework.oxm.Unmarshaller; +import org.springframework.tests.Assume; +import org.springframework.tests.TestGroup; import static org.junit.Assert.*; @@ -33,13 +36,17 @@ import static org.junit.Assert.*; * NOTE: These tests fail under Eclipse/IDEA because JiBX binding does * not occur by default. The Gradle build should succeed, however. */ -@Ignore("INCOMPATIBLE WITH OPENJDK 8 b89+") public class JibxUnmarshallerTests extends AbstractUnmarshallerTests { protected static final String INPUT_STRING_WITH_SPECIAL_CHARACTERS = "" + "Air Libert\u00e942"; + @BeforeClass + public static void compilerAssumptions() { + Assume.group(TestGroup.CUSTOM_COMPILATION); + } + @Override protected Unmarshaller createUnmarshaller() throws Exception { JibxMarshaller unmarshaller = new JibxMarshaller(); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java index d47c7383dd..82e05ff417 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java @@ -29,6 +29,7 @@ import org.junit.BeforeClass; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.tests.Assume; +import org.springframework.tests.TestGroup; import org.springframework.ui.jasperreports.PersonBean; import org.springframework.ui.jasperreports.ProductBean; import org.springframework.util.ClassUtils; @@ -59,6 +60,7 @@ public abstract class AbstractJasperReportsTests { @BeforeClass public static void assumptions() { Assume.canLoadNativeDirFonts(); + Assume.group(TestGroup.CUSTOM_COMPILATION); } @Before