This is an automated email from the ASF dual-hosted git repository. rec pushed a commit to branch bugfix/UIMA-6222-XML-related-unit-test-fails-on-Java-9 in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git
commit b4641331c6ecc45c2db978058b01e435a232438c Author: Richard Eckart de Castilho <r...@apache.org> AuthorDate: Sat Apr 18 21:06:19 2020 +0200 [UIMA-6222] XML-related unit test fails on Java 9+ - Ignore whitespace during XML comparison to run on recent JDKs --- .../java/org/apache/uima/fit/factory/AnalysisEngineFactoryTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uimafit-core/src/test/java/org/apache/uima/fit/factory/AnalysisEngineFactoryTest.java b/uimafit-core/src/test/java/org/apache/uima/fit/factory/AnalysisEngineFactoryTest.java index e5ee069..32208d2 100644 --- a/uimafit-core/src/test/java/org/apache/uima/fit/factory/AnalysisEngineFactoryTest.java +++ b/uimafit-core/src/test/java/org/apache/uima/fit/factory/AnalysisEngineFactoryTest.java @@ -85,6 +85,7 @@ import org.apache.uima.resource.metadata.TypePriorityList; import org.apache.uima.resource.metadata.TypeSystemDescription; import org.apache.uima.util.XMLInputSource; import org.custommonkey.xmlunit.XMLAssert; +import org.custommonkey.xmlunit.XMLUnit; import org.junit.Test; public class AnalysisEngineFactoryTest extends ComponentTestBase { @@ -564,6 +565,7 @@ public class AnalysisEngineFactoryTest extends ComponentTestBase { String actual = FileUtils.readFileToString(target, "UTF-8"); String expected = FileUtils.readFileToString(reference, "UTF-8"); + XMLUnit.setIgnoreWhitespace(true); XMLAssert.assertXMLEqual(expected, actual); // assertEquals(expected, actual); } @@ -581,7 +583,6 @@ public class AnalysisEngineFactoryTest extends ComponentTestBase { AnalysisEngine ae = createEngine(createEngineDescription(specifier)); - // Create a CAS with a sample document text and process the CAS CAS cas = ae.newCAS(); cas.setDocumentText("Sample text to process with a date 05/29/07 and a time 9:45 AM");