In the process of manually building the jackson-core module using the latest version of 2.11.2 I am encountering an error in the unit tests; which I'm assuming is due to a setting issue on my laptop.
Steps Performed:
git checkout tags/jackson-core-2.11.2
mvn package
Result:
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in com.fasterxml.jackson.core.type.TypeReferenceTest
[INFO] Running com.fasterxml.jackson.core.util.ByteArrayBuilderTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in com.fasterxml.jackson.core.util.ByteArrayBuilderTest
[INFO] Running com.fasterxml.jackson.core.util.DefaultIndenterTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.006 s <<< FAILURE! - in com.fasterxml.jackson.core.util.DefaultIndenterTest
[ERROR] testWithIndent(com.fasterxml.jackson.core.util.DefaultIndenterTest) Time elapsed: 0.002 s <<< FAILURE!
org.junit.ComparisonFailure:
expected:<[]
] but was:<[
>
at com.fasterxml.jackson.core.util.DefaultIndenterTest.testWithIndent(DefaultIndenterTest.java:32)
[INFO] Running com.fasterxml.jackson.core.util.RequestPayloadTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in com.fasterxml.jackson.core.util.RequestPayloadTest
[INFO] Running com.fasterxml.jackson.core.util.SeparatorsTest
....
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] DefaultIndenterTest.testWithIndent:32 expected:<[]
] but was:<[
>
[INFO]
[ERROR] Tests run: 895, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
Question: I was wondering what setting could be wrong on the laptop that is causing the failure in the Unit tests?
Looking at their code, specially at the specific unit test, they are comparing \n
as the Eol
.
I believe the error you are seeing could be related to the OS you are running on as it might differ between them.