Skip to content

Commit

Permalink
[hotfix][rest][tests] Pin line-endings in API snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Mar 1, 2021
1 parent f744f81 commit cb050b6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.apache.flink.util.TestLogger;

import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonProcessingException;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode;
Expand Down Expand Up @@ -98,7 +100,9 @@ private static void writeSnapshot(
final String versionedSnapshotFileName, final RestAPISnapshot snapshot)
throws IOException {
OBJECT_MAPPER
.writerWithDefaultPrettyPrinter()
.writer(
new DefaultPrettyPrinter()
.withObjectIndenter(new DefaultIndenter().withLinefeed("\n")))
.writeValue(new File("src/test/resources/" + versionedSnapshotFileName), snapshot);
System.out.println(
"REST API snapshot "
Expand Down

0 comments on commit cb050b6

Please sign in to comment.