This "fix" makes the test work:

1) add an import: import org.custommonkey.xmlunit.XMLUnit;

2) in front of the failing line ( XMLAssert.assertXMLEqual(expected, actual); )
add this line:

XMLUnit.setIgnoreWhitespace(true);

Cheers. -M

On 4/17/2020 5:18 PM, Marshall Schor wrote:
> found the problem. 
>
> I was doing the build with Java 13.
>
> Switched back to Java 8 and it worked.
>
> In Java 13, the serialization has extra blank lines in the output.
> Maybe there's a way to configure the XML compare utility to ignore this?
>
> -Marshall
>
>
> On 4/17/2020 4:24 PM, Marshall Schor wrote:
>> When doing build from sources, during the testing of the uimafit-core,
>>
>> it got
>>
>> [INFO] Running org.apache.uima.fit.factory.AnalysisEngineFactoryTest
>> Apr 17, 2020 4:13:04 PM PackageInstaller installPackage
>> INFO: Package installer message: [InstallationController]: extracting
>> C:\au\t\uimaFIT\2.5.0\rc1\uimafit-2.5.0-bfs\uimafit-core\src\test\resources\pear\DateTime.pear
>>
>> Apr 17, 2020 4:13:04 PM PackageInstaller installPackage
>> INFO: Package installer message: [InstallationController]: 44271 bytes 
>> extracted
>>
>> Apr 17, 2020 4:13:04 PM PackageInstaller installPackage
>> INFO: Package installer message: [InstallationProcessor]: start processing 
>> InsD
>> file -
>> C:\au\t\uimaFIT\2.5.0\rc1\uimafit-2.5.0-bfs\uimafit-core\target\test-output\AnalysisEngineFactoryTest\testPear\uima.example.DateTimeAnnotator\metadata\install.xml
>>
>> Apr 17, 2020 4:13:04 PM PackageInstaller installPackage
>> INFO: Package installer message: [InstallationController]: the
>> metadata/setenv.txt file contains required environment variables for this 
>> component
>> [InstallationController]: component uima.example.DateTimeAnnotator 
>> installation
>> completed.
>>
>> Apr 17, 2020 4:13:04 PM PackageInstaller installPackage
>> INFO: Installation verification of component uima.example.DateTimeAnnotator
>> successfully completed.
>> Apr 17, 2020 4:13:04 PM org.apache.uima.tutorial.ex3.TutorialDateTime 
>> process(159)
>> WARNING: No output is being produced by the TutorialDateTime annotator 
>> because
>> the Result Specification did not contain a request for the type
>>   org.apache.uima.tutorial.TimeAnnot nor
>>   org.apache.uima.tutorial.DateAnnot with the language 'en'
>>   (Note: this message will only be shown once.)
>>
>> [ERROR] Tests run: 18, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
>> 0.343 s
>> <<< FAILURE! - in org.apache.uima.fit.factory.AnalysisEngineFactoryTest
>> [ERROR]
>> serializeComponent(org.apache.uima.fit.factory.AnalysisEngineFactoryTest)  
>> Time
>> elapsed: 0.048 s  <<< FAILURE!
>> junit.framework.AssertionFailedError:
>> org.custommonkey.xmlunit.Diff
>> [different] Expected text value '
>>     ' but was '
>>
>>     ' - comparing <analysisEngineDescription ...>
>>     </analysisEngineDescription> at /analysisEngineDescription[1]/text()[1] 
>> to
>> <analysisEngineDescription ...>
>>
>>     </analysisEngineDescription> at /analysisEngineDescription[1]/text()[1]
>>
>>         at
>> org.apache.uima.fit.factory.AnalysisEngineFactoryTest.serializeComponent(AnalysisEngineFactoryTest.java:567)
>>
>>
>> Do I have something configured incorrectly?
>>
>> -Marshall
>>

Reply via email to