Skip to content

Commit

Permalink
Adapt to changes in the locking model for closing an app context
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Dec 12, 2023
1 parent a242bd8 commit 612bf95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ void runWhenContextIsBeingClosedInAnotherThreadWaitsUntilContextIsInactive() thr
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();
Expand Down

0 comments on commit 612bf95

Please sign in to comment.