Skip to content

Commit f13cca4

Browse files
committed
reduce raciness
1 parent df7c2fb commit f13cca4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/src/com/rabbitmq/client/test/server/DeadLetterExchangeDurable.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public void testDeadLetterQueueTTLExpiredWhileDown() throws Exception {
4242
openConnection();
4343
openChannel();
4444

45+
//This has the effect of waiting for the queue to complete the
46+
//dead lettering. Some raciness remains though since the
47+
//dead-letter publication is async so the 'consume' below may
48+
//reach the dlq before all dead-lettered messages have arrived
49+
//there.
50+
assertNull(basicGet(DeadLetterExchange.TEST_QUEUE_NAME));
51+
4552
DeadLetterExchange.consume(channel, "expired");
4653
}
4754
}

0 commit comments

Comments
 (0)