raml-java-parser icon indicating copy to clipboard operation
raml-java-parser copied to clipboard

Tests fail on non-English locale

Open hwellmann opened this issue 9 years ago • 1 comments

Running mvn clean install fails when the system locale is not English, e.g.

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.096 sec <<< FAILURE!
full(org.raml.v2.api.LeaguesV10TestCase)  Time elapsed: 0.096 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: a string containing "Cannot find the declaration of element 'leaguee'"
     but: was "Error validating XML. Error: cvc-elt.1: Deklaration des Elements 'leaguee' kann nicht gefunden werden."
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at org.raml.v2.api.LeaguesV10TestCase.assertBody(LeaguesV10TestCase.java:199)

Assertions should not depend on error messages from the XML parser. They may also vary with the JDK version.

Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-112

hwellmann avatar Sep 10 '16 13:09 hwellmann

Not only that. On an windows system it fails due to validating file names.

Running org.raml.v2.api.LibraryTestCase
Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec <<< FAILURE!
selfCyclic(org.raml.v2.api.LibraryTestCase)  Time elapsed: 0.008 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<...cy loading file: src[/test/resources/org/raml/v2/api/v10/cyclic-uses/]file3.raml> but was:<...cy loading file: src[\test\resources\org\raml\v2\api\v10\cyclic-uses\]file3.raml>

Others are:

runTest[examples.builtin.date](org.raml.v2.parser.InternalTckTestCase)  Time elapsed: 0.115 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: a collection with size <0>
     but: collection size was <2>

and other failures. Adding the complete build.log to this item. log.txt

temporary workaround: i disable the tests on my local machine.

willie68 avatar Dec 01 '16 15:12 willie68