From c5b5449a076996e4a45b2264a9d83a9d1503b979 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Wed, 11 Jan 2023 10:48:57 +0100 Subject: [PATCH] Fix assertions in ThreadDumpEndpointTests --- .../boot/actuate/management/ThreadDumpEndpointTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointTests.java index ca6b1d32eb..1e7aadf6d1 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/ThreadDumpEndpointTests.java @@ -106,9 +106,10 @@ class ThreadDumpEndpointTests { hexIdentityHashCode(contendedMonitor), Thread.currentThread().getName(), Thread.currentThread().getId())) .satisfiesAnyOf( - (dump) -> dump.contains(String.format("\t- waiting on <%s> (a java.lang.Object)", + (dump) -> assertThat(dump).contains(String.format("\t- waiting on <%s> (a java.lang.Object)", hexIdentityHashCode(monitor))), - (dump) -> dump.contains(String.format("\t- parking to wait for <%s> (a java.lang.Object)", + (dump) -> assertThat(dump).contains(String.format( + "\t- parking to wait for <%s> (a java.lang.Object)", hexIdentityHashCode(monitor)))) .containsPattern( String.format("Locked ownable synchronizers:%n\t- Locked <[0-9a-z]+> \\(a %s\\$NonfairSync\\)",