You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2020/04/19 13:34:57 UTC

[uima-uimafit] 01/04: [UIMA-6222] XML-related unit test fails on Java 9+

This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch release/3.1.0
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git

commit efdb010dcb305139a10bbc7c6c8c8412fb96b141
Author: Richard Eckart de Castilho <re...@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
    
    (cherry picked from commit b4641331c6ecc45c2db978058b01e435a232438c)
---
 .../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");