File tree Expand file tree Collapse file tree
core/spring-boot/src/test/java/org/springframework/boot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727import org .awaitility .Awaitility ;
2828import org .jspecify .annotations .Nullable ;
29- import org .junit .jupiter .api .Disabled ;
3029import org .junit .jupiter .api .Test ;
3130import org .mockito .InOrder ;
3231
@@ -100,7 +99,6 @@ void runClosesContextsBeforeRunningHandlerActions() {
10099 }
101100
102101 @ Test
103- @ Disabled
104102 void runWhenContextIsBeingClosedInAnotherThreadWaitsUntilContextIsInactive () throws InterruptedException {
105103 // This situation occurs in the Spring Tools IDE. It triggers a context close via
106104 // JMX and then stops the JVM. The two actions happen almost simultaneously
@@ -120,7 +118,7 @@ void runWhenContextIsBeingClosedInAnotherThreadWaitsUntilContextIsInactive() thr
120118 Thread shutdownThread = new Thread (shutdownHook );
121119 shutdownThread .start ();
122120 // Shutdown thread should start waiting for context to become inactive
123- Awaitility .await ().atMost (Duration .ofSeconds (30 )).until (shutdownThread ::getState , State .WAITING ::equals );
121+ Awaitility .await ().atMost (Duration .ofSeconds (30 )).until (shutdownThread ::getState , State .TIMED_WAITING ::equals );
124122 // Allow context thread to proceed, unblocking shutdown thread
125123 proceedWithClose .countDown ();
126124 contextThread .join ();
You can’t perform that action at this time.
0 commit comments