Adapt to changes in the locking model for closing an app context
See gh-38666
This commit is contained in:
parent
a242bd81e2
commit
612bf95b05
|
|
@ -112,8 +112,8 @@ class SpringApplicationShutdownHookTests {
|
|||
closing.await();
|
||||
Thread shutdownThread = new Thread(shutdownHook);
|
||||
shutdownThread.start();
|
||||
// Shutdown thread should become blocked on monitor held by context thread
|
||||
Awaitility.await().atMost(Duration.ofSeconds(30)).until(shutdownThread::getState, State.BLOCKED::equals);
|
||||
// Shutdown thread should start waiting for context to become inactive
|
||||
Awaitility.await().atMost(Duration.ofSeconds(30)).until(shutdownThread::getState, State.TIMED_WAITING::equals);
|
||||
// Allow context thread to proceed, unblocking shutdown thread
|
||||
proceedWithClose.countDown();
|
||||
contextThread.join();
|
||||
|
|
|
|||
Loading…
Reference in New Issue