Skip to content

Commit 00487ae

Browse files
committed
Refine shutdown deferral test for robustness
Improve test robustness by increasing the await timeout and remove unnecessary cleanup code per review feedback. Signed-off-by: Jeongjun Min <[email protected]>
1 parent 1dd2d72 commit 00487ae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainerTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,9 @@ void testShutdownWithPendingReplies() {
753753

754754
container.stop();
755755

756-
await().atMost(Duration.ofMillis(500)).untilAsserted(() ->
756+
await().atMost(Duration.ofSeconds(1)).untilAsserted(() ->
757757
verify(logger).warn("Shutdown timeout expired, but 1 pending replies still remain.")
758758
);
759-
760-
replyCounter.release(pending);
761759
}
762760

763761
private Answer<Object> messageToConsumer(final Channel mockChannel, final SimpleMessageListenerContainer container,

0 commit comments

Comments
 (0)