Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System language dependant test failure #41

Open
zerjioang opened this issue Feb 5, 2018 · 2 comments
Open

System language dependant test failure #41

zerjioang opened this issue Feb 5, 2018 · 2 comments

Comments

@zerjioang
Copy link

zerjioang commented Feb 5, 2018

Current version is system language dependant for test execution so that having an spanish language, for example, decimal numbers are splitted by comma. Therefore a test failure is thrown with following logs:

Failed tests:   testFloat(com.j256.simplemagic.entries.FormatterTest): expected:<1[.]2> but was:<1[,]2>
  testFloatScientific(com.j256.simplemagic.entries.FormatterTest): expected:<1[.]2E0> but was:<1[,]2E0>
  testFloatMixed(com.j256.simplemagic.entries.FormatterTest): expected:<1[.]2> but was:<1[,]2>
  testFiles(com.j256.simplemagic.ContentInfoUtilTest): bad message for /files/x.nuv expected:<...progressive,aspect:1[.00,fps:29.]97> but was:<...progressive,aspect:1[,00,fps:29,]97>
  testPerformanceRun(com.j256.simplemagic.ContentInfoUtilTest): bad message for /files/x.nuv expected:<...progressive,aspect:1[.00,fps:29.]97> but was:<...progressive,aspect:1[,00,fps:29,]97>

Tests run: 250, Failures: 5, Errors: 0, Skipped: 2

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.280 s
[INFO] Finished at: 2018-02-05T14:54:27Z
[INFO] Final Memory: 25M/265M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project simplemagic: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/simplemagic/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

In short, if you have your system language/maven language/java language in Spanish,

mvn install

command will fail.

My system settings are:

Apache Maven 3.5.0
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: es_ES, platform encoding: UTF-8
OS name: "linux", version: "4.13.0-32-generic", arch: "amd64", family: "unix"
@j256
Copy link
Owner

j256 commented Mar 15, 2018

Good point. I'll take a look.

@stokito
Copy link

stokito commented Feb 6, 2019

in fact such kind of errors may occur even on upgrade of JDK: the number formats was changed in JDK9 and JDK11 and will be changed in future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants