Skip to content

Commit 76db407

Browse files
author
Alexandru Scvortov
committed
add test for deleting a queue with a DLX twice
1 parent ea13988 commit 76db407

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,23 @@ public void run() {
106106
}, args, PropertiesFactory.NULL, "expired");
107107
}
108108

109+
public void testDeadLetterExchangeDeleteTwice()
110+
throws IOException
111+
{
112+
Map<String, Object> args = new HashMap<String, Object>();
113+
args.put("x-message-ttl", 1);
114+
115+
declareQueue(TEST_QUEUE_NAME, DLX, null, args);
116+
117+
publishN(MSG_COUNT_MANY, PropertiesFactory.NULL);
118+
channel.queueDelete(TEST_QUEUE_NAME);
119+
try {
120+
channel.queueDelete(TEST_QUEUE_NAME);
121+
} catch (IOException ex) {
122+
checkShutdownSignal(AMQP.NOT_FOUND, ex);
123+
}
124+
}
125+
109126
public void testDeadLetterOnReject() throws Exception {
110127
deadLetterTest(new Callable<Void>() {
111128
public Void call() throws Exception {

0 commit comments

Comments
 (0)