aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java
index d752b67b4c5..ea0028bf90a 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoderTest.java
@@ -70,9 +70,11 @@ class ScannerLogbackEncoderTest {
var bytes = underTest.encode(logEvent);
- assertThat(new String(bytes, StandardCharsets.UTF_8))
- .startsWith(
- "{\"level\":\"DEBUG\",\"message\":\"message\",\"stacktrace\":\"java.lang.IllegalArgumentException: foo\\n\\tat org.sonar.scanner.bootstrap.ScannerLogbackEncoderTest.should_encode_with_stacktrace");
+ String encodedLog = new String(bytes, StandardCharsets.UTF_8);
+ assertThat(encodedLog).contains("\"level\":\"DEBUG\"")
+ .contains("\"message\":\"message\"")
+ .contains("\"stacktrace\":\"java.lang.IllegalArgumentException: foo")
+ .contains("at org.sonar.scanner.bootstrap.ScannerLogbackEncoderTest.should_encode_with_stacktrace");
}
}