Merge pull request #38103 from izeye

* pr/38103:
  Fix shouldStopKeepAliveThreadIfContextIsClosed()

Closes gh-38103
This commit is contained in:
Moritz Halbritter
2023-10-30 09:28:59 +01:00

View File

@@ -1425,8 +1425,9 @@ class SpringApplicationTests {
this.context.close();
Awaitility.await()
.atMost(Duration.ofSeconds(30))
.untilAsserted(() -> assertThat(getCurrentThreads())
.filteredOn((thread) -> thread.getName().equals("keep-alive")));
.untilAsserted(
() -> assertThat(getCurrentThreads()).filteredOn((thread) -> thread.getName().equals("keep-alive"))
.isEmpty());
}
private <S extends AvailabilityState> ArgumentMatcher<ApplicationEvent> isAvailabilityChangeEventWithState(