diff --git a/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java index cc9d0c0d72697..b10dba6f065b1 100644 --- a/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java +++ b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java @@ -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; @@ -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 "