Skip to content

Commit b3512f1

Browse files
committed
Reset physical close flag on test-worker thread
1 parent 1c13121 commit b3512f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@ public void testConsumerChannelPhysicallyClosedWhenNotIsOpenGuts(boolean confirm
15121512
return null;
15131513
}).when(mockChannel).close();
15141514
channel.close();
1515+
RabbitUtils.setPhysicalCloseRequired(channel, false);
15151516
con.close(); // should be ignored
15161517

15171518
assertTrue(physicalCloseLatch.await(10, TimeUnit.SECONDS));
@@ -1649,6 +1650,7 @@ public void testReturnsNormalCloseDeferredClose() throws Exception {
16491650
Channel channel = conn.createChannel(false);
16501651
RabbitUtils.setPhysicalCloseRequired(channel, true);
16511652
channel.close();
1653+
RabbitUtils.setPhysicalCloseRequired(channel, false);
16521654
Thread.sleep(6000);
16531655
}
16541656

0 commit comments

Comments
 (0)