Fix assertions in ThreadDumpEndpointTests

pull/33770/merge
Moritz Halbritter 2 years ago
parent 17d4fb1e60
commit c5b5449a07

@ -106,9 +106,10 @@ class ThreadDumpEndpointTests {
hexIdentityHashCode(contendedMonitor), Thread.currentThread().getName(), hexIdentityHashCode(contendedMonitor), Thread.currentThread().getName(),
Thread.currentThread().getId())) Thread.currentThread().getId()))
.satisfiesAnyOf( .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))), 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)))) hexIdentityHashCode(monitor))))
.containsPattern( .containsPattern(
String.format("Locked ownable synchronizers:%n\t- Locked <[0-9a-z]+> \\(a %s\\$NonfairSync\\)", String.format("Locked ownable synchronizers:%n\t- Locked <[0-9a-z]+> \\(a %s\\$NonfairSync\\)",

Loading…
Cancel
Save