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

jzy3d-jdt-core tests are failing on Windows #52

Closed
Tunaki opened this issue Jan 17, 2016 · 1 comment
Closed

jzy3d-jdt-core tests are failing on Windows #52

Tunaki opened this issue Jan 17, 2016 · 1 comment
Labels

Comments

@Tunaki
Copy link
Contributor

Tunaki commented Jan 17, 2016

When building the project on Windows, the test SmokeTest.shouldRunOnExampleData is failing because two compared files do not have the same line endings. The error is:

Running il.ac.idc.jdt.SmokeTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@17d10166
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.696 sec <<< FAILURE!
shouldRunOnExampleData(il.ac.idc.jdt.SmokeTest)  Time elapsed: 0.231 sec  <<< FAILURE!
java.lang.AssertionError: t1_1000.tsin trangulation is correct for smf
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:26)
        at il.ac.idc.jdt.SmokeTest.shouldRunOnExampleData(SmokeTest.java:28)

Results :

Failed tests:   shouldRunOnExampleData(il.ac.idc.jdt.SmokeTest): t1_1000.tsin trangulation is correct for smf

This happens because the control files inside the folder jzy3d-jdt-core\src\test\resources\outputs have Unix line endings (\n) when the created temporary files have Windows line-endings (\r\n).

A possible solution is to use IOUtils.contentEqualsIgnoreEOL inside this test (and giving it a Reader, by wrapping the InputStream with a InputStreamReader) instead of IOUtils.contentEquals.

This was brought up in a Stack Overflow question: http://stackoverflow.com/questions/34766439/failure-to-execute-goal-maven-surefire-plugin-on-child-module-for-jzy3d-program

@jzy3d
Copy link
Owner

jzy3d commented Mar 6, 2016

Thank you for the suggestion. Pull request with fix most welcome :)

@jzy3d jzy3d added the bug label Mar 6, 2016
Tunaki added a commit to Tunaki/jzy3d-api that referenced this issue Mar 6, 2016
Using contentEqualsIgnoreEOL instead of contentEquals to ignore end of
lines when comparing file contents.
jzy3d added a commit that referenced this issue Mar 12, 2016
Issue #52: jzy3d-jdt-core tests are failing on Windows
@jzy3d jzy3d closed this as completed Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants