Fix shouldStopKeepAliveThreadIfContextIsClosed()
See gh-38103
This commit is contained in:
parent
4ac654717a
commit
1b6431c219
|
|
@ -1425,8 +1425,9 @@ class SpringApplicationTests {
|
||||||
this.context.close();
|
this.context.close();
|
||||||
Awaitility.await()
|
Awaitility.await()
|
||||||
.atMost(Duration.ofSeconds(30))
|
.atMost(Duration.ofSeconds(30))
|
||||||
.untilAsserted(() -> assertThat(getCurrentThreads())
|
.untilAsserted(
|
||||||
.filteredOn((thread) -> thread.getName().equals("keep-alive")));
|
() -> assertThat(getCurrentThreads()).filteredOn((thread) -> thread.getName().equals("keep-alive"))
|
||||||
|
.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
private <S extends AvailabilityState> ArgumentMatcher<ApplicationEvent> isAvailabilityChangeEventWithState(
|
private <S extends AvailabilityState> ArgumentMatcher<ApplicationEvent> isAvailabilityChangeEventWithState(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue