Skip to content

Commit

Permalink
Fix JsonLoggerTests.testJsonInStacktraceMessageIsSplitted backport#39…
Browse files Browse the repository at this point in the history
…830 elastic#39833

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
  • Loading branch information
pgomulka committed Mar 8, 2019
1 parent a36c384 commit 21d9803
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void testJsonInStacktraceMessageIsSplitted() throws IOException {
logLine("file", Level.ERROR, "sample-name", "test", "error message " + json),

//stacktrace field will have each json line will in a separate array element
stacktraceWith(("java.lang.Exception: " + json).split("\n"))
stacktraceWith(("java.lang.Exception: " + json).split(LINE_SEPARATOR))
)
));
}
Expand Down

0 comments on commit 21d9803

Please sign in to comment.