You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org> on 2018/02/11 19:36:00 UTC

[jira] [Created] (UIMA-5726) UIMA-DUCC: JD TestSuite fails in checkCas()

Jerry Cwiklik created UIMA-5726:
-----------------------------------

             Summary: UIMA-DUCC: JD TestSuite fails in checkCas() 
                 Key: UIMA-5726
                 URL: https://issues.apache.org/jira/browse/UIMA-5726
             Project: UIMA
          Issue Type: Bug
          Components: DUCC
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
             Fix For: 2.2.2-Ducc


After upgrading ducc to use uima 2.10.2, the ducc build fails while running JD junit tests. The reported error is:

test_16(org.apache.uima.ducc.container.jd.test.Test1) Time elapsed: 0.326 sec <<< FAILURE!
java.lang.AssertionError: cas = '<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmlns:examples="http:///org/apache/uima/examples.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:cas="http:///uima/cas.ecore" xmi:version="2.0"><cas:NULL xmi:id="0"/><tcas:DocumentAnnotation xmi:id="8" sofa="1" begin="0" end="1" language="x-unspecified"/><cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="1"/><cas:View sofa="1" members="8"/></xmi:XMI>'
 at org.junit.Assert.fail(Assert.java:91)
 at org.apache.uima.ducc.container.jd.test.TestSuite.checkCas(TestSuite.java:43)
 at org.apache.uima.ducc.container.jd.test.TestSuite.getMetaCases(TestSuite.java:161)
 at org.apache.uima.ducc.container.jd.test.TestSuite.getMetaCases(TestSuite.java:174)
 at org.apache.uima.ducc.container.jd.test.Test1.test_16(Test1.java:71)

 

The TestSuite.checkCas() expects either of these 3 xml preambles:

  String prefix2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xmi:XMI xmlns:examples=\"http:///org/apache/uima/examples.ecore\"";
 String prefix1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xmi:XMI xmlns:tcas=\"http:///uima/tcas.ecore\"";
 String prefix0 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xmi:XMI xmlns:cas=\"http:///uima/cas.ecore\"";

 

It looks like CAS serialization produces a different preamble:

<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmlns:examples="http:///org/apache/uima/examples.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:cas="http:///uima/cas.ecore" xmi:version="2.0">

Not sure about the cause of this. Perhaps the new uima (2.10.2) is serializing differently now. I was able to fix the problem by adding a new prefix (prefix3) to make sure the new xml preamble matches. Perhaps I am fixing the wrong thing here. Why there is this preamble different from before is the question. Looks like code doing the CAS serialization is producing a different xml. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)