RFR: 7540: IItemCollectionJsonSerializerTest.java might fail on Windows due to line endings [v2]
Alex Ciminian
duke at openjdk.java.net
Wed Apr 27 16:37:45 UTC 2022
On Sat, 22 Jan 2022 06:38:33 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>> Fix test IItemCollectionJsonSerializerTest.java
>>
>> The line endings should be normalized, to avoid errors on Windows due to incompatible line ending formats.
>
> Christoph Langer has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> JMC-7540
> Fix test IItemCollectionJsonSerializerTest.java
core/tests/org.openjdk.jmc.flightrecorder.serializers.test/src/test/java/org/openjdk/jmc/flightrecorder/serializers/json/test/IItemCollectionJsonSerializerTest.java line 69:
> 67: String actual = IItemCollectionJsonSerializer.toJsonString(testRecording);
> 68:
> 69: assertEquals(expected.replaceAll("\\r\\n", "\n"), actual.replaceAll("\\r\\n", "\n"));
Sorry, I'm late to the party I wrote this test and I'm curious what the problem was here
Did this test fail for you? I don't understand how it can be different on windows since the JSON file has unix line endings and the serialiser will output unix line endings.
-------------
PR: https://git.openjdk.java.net/jmc/pull/370
More information about the jmc-dev
mailing list