Skip to content

Commit 3b9b096

Browse files
committed
Merge branch '3.5.x' into 4.0.x
Closes spring-projectsgh-49157
2 parents 775cabc + b9cb575 commit 3b9b096

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationShutdownHookTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import org.awaitility.Awaitility;
2828
import org.jspecify.annotations.Nullable;
29-
import org.junit.jupiter.api.Disabled;
3029
import org.junit.jupiter.api.Test;
3130
import 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();

0 commit comments

Comments
 (0)