From c23ff0803edd1588649499844a0d9935d111b765 Mon Sep 17 00:00:00 2001 From: Przemyslaw Gomulka Date: Fri, 8 Mar 2019 16:34:17 +0100 Subject: [PATCH] Fix JsonLoggerTests.testJsonInStacktraceMessageIsSplitted backport#39830 #39834 a test was splitting a json log message with a wrong line separator. Using System.lineSeparator consistently prevents this problem closes #39829 backport#39830 --- .../java/org/elasticsearch/common/logging/JsonLoggerTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java b/qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java index 1f7479dd3de..bbb20737c47 100644 --- a/qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java +++ b/qa/logging-config/src/test/java/org/elasticsearch/common/logging/JsonLoggerTests.java @@ -174,7 +174,7 @@ public class JsonLoggerTests extends ESTestCase { 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)) ) )); }