Skip to content

Commit c23ff08

Browse files
authored
Fix JsonLoggerTests.testJsonInStacktraceMessageIsSplitted backport#39830 elastic#39834
a test was splitting a json log message with a wrong line separator. Using System.lineSeparator consistently prevents this problem closes elastic#39829 backport#39830
1 parent e6b9262 commit c23ff08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void testJsonInStacktraceMessageIsSplitted() throws IOException {
174174
logLine("file", Level.ERROR, "sample-name", "test", "error message " + json),
175175

176176
//stacktrace field will have each json line will in a separate array element
177-
stacktraceWith(("java.lang.Exception: " + json).split("\n"))
177+
stacktraceWith(("java.lang.Exception: " + json).split(LINE_SEPARATOR))
178178
)
179179
));
180180
}

0 commit comments

Comments
 (0)