Skip to content

Commit 491a335

Browse files
committed
Attempt to fix Windows build failures
See gh-43864
1 parent 7433b93 commit 491a335

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/StandardStackTracePrinterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void withFrameFormatterFormatsFrame() {
311311
StandardStackTracePrinter printer = StandardStackTracePrinter.rootLast()
312312
.withFrameFormatter(
313313
(element) -> ClassUtils.getShortName(element.getClassName()) + "." + element.getMethodName());
314-
assertThat(printer.printStackTraceToString(exception)).isEqualTo("""
314+
assertThat(printer.printStackTraceToString(exception)).isEqualToNormalizingNewlines("""
315315
java.lang.RuntimeException: exception
316316
at TestException.actualCreateException
317317
at TestException.createException
@@ -335,7 +335,7 @@ void withHashesFunctionPrintsStackTraceWithHashes() {
335335
Throwable exception = TestException.create();
336336
StandardStackTracePrinter printer = StandardStackTracePrinter.rootLast()
337337
.withHashes((frame) -> Objects.hash(frame.getClassName(), frame.getMethodName()));
338-
assertThat(printer.printStackTraceToString(exception)).isEqualTo("""
338+
assertThat(printer.printStackTraceToString(exception)).isEqualToNormalizingNewlines("""
339339
<#cc3eebec> java.lang.RuntimeException: exception
340340
at org.springframework.boot.logging.TestException.actualCreateException(TestException.java:63)
341341
at org.springframework.boot.logging.TestException.createException(TestException.java:59)
@@ -384,7 +384,7 @@ private String standardStackTrace() {
384384
private void assertThatCleanedStackTraceMatches(StandardStackTracePrinter printer, Throwable throwable,
385385
String expected) {
386386
String actual = printer.printStackTraceToString(throwable);
387-
assertThat(TestException.withoutLineNumbers(actual)).isEqualTo(expected);
387+
assertThat(TestException.withoutLineNumbers(actual)).isEqualToNormalizingNewlines(expected);
388388
}
389389

390390
}

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/structured/StructuredLoggingJsonPropertiesTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void createPrinterWhenStandardAppliesCustomizations() {
146146
StackTrace properties = new StackTrace(null, Root.FIRST, 300, 2, true, false);
147147
StackTracePrinter printer = properties.createPrinter();
148148
String actual = TestException.withoutLineNumbers(printer.printStackTraceToString(exception));
149-
assertThat(actual).isEqualTo("""
149+
assertThat(actual).isEqualToNormalizingNewlines("""
150150
java.lang.RuntimeException: exception
151151
at org.springframework.boot.logging.TestException.actualCreateException(TestException.java:NN)
152152
at org.springframework.boot.logging.TestException.createException(TestException.java:NN)

0 commit comments

Comments
 (0)