Skip to content

Commit 4170b5e

Browse files
author
Alexandru Scvortov
committed
unhang a test
This only became a problem when running all the java tests.
1 parent 7c9d861 commit 4170b5e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/src/com/rabbitmq/client/test/functional/DeadLetterExchange.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ public void testDeadLetterSelf() throws Exception {
210210
declareQueue(TEST_QUEUE_NAME, "amq.direct", "test", null, 1);
211211
channel.queueBind(TEST_QUEUE_NAME, "amq.direct", "test");
212212

213-
publishN(MSG_COUNT_MANY, PropertiesFactory.NULL);
214-
sleep(100);
213+
publishN(MSG_COUNT, PropertiesFactory.NULL);
214+
// This test hangs if the queue doesn't process ALL the
215+
// messages before being deleted, so make sure the next
216+
// sleep is long enough.
217+
sleep(200);
215218

216219
// The messages will NOT be dead-lettered to self.
217220
consumeN(TEST_QUEUE_NAME, 0, new WithResponse() {

0 commit comments

Comments
 (0)