Skip to content

Commit 0fbbf85

Browse files
author
Alexandru Scvortov
committed
re-add dead-letter-to-self test checking for the new condition
Also, I think purging an empty queue hangs.
1 parent 82d5f6d commit 0fbbf85

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,21 @@ public void process(GetResponse getResponse) {
219219
});
220220
}
221221

222+
public void testDeadLetterSelf() throws Exception {
223+
declareQueue(TEST_QUEUE_NAME, "amq.direct", "test", null);
224+
channel.queueBind(TEST_QUEUE_NAME, "amq.direct", "test");
225+
226+
publishN(MSG_COUNT_MANY, PropertiesFactory.NULL);
227+
channel.queuePurge(TEST_QUEUE_NAME);
228+
sleep(100);
229+
230+
// The messages will NOT be dead-lettered to self.
231+
consumeN(TEST_QUEUE_NAME, 0, new WithResponse() {
232+
public void process(GetResponse getResponse) {
233+
}
234+
});
235+
}
236+
222237
public void testDeadLetterNewRK() throws Exception {
223238
declareQueue(TEST_QUEUE_NAME, DLX, "test-other", null);
224239

0 commit comments

Comments
 (0)