Skip to content

Commit 9d0b8f2

Browse files
Update a few tests to explicitly delete queues
Due to changes in [1] argument mismatch that involves the exclusive property can report a different channel exception (406 LOCKED). Since it has nothing to do with dead-lettering, switching to cleaning up queues manually and relying on their non-durability e.g. between CI runs is sufficient. Spotted by @acogoluegnes. 1. rabbitmq/rabbitmq-server@bd46898 (cherry picked from commit dae7b13)
1 parent 7d8b7bc commit 9d0b8f2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828

2929
public class DeadLetterExchange extends BrokerTestCase {
3030
public static final String DLX = "dead.letter.exchange";
31-
public static final String DLX_ARG = "x-dead-letter-exchange";
32-
public static final String DLX_RK_ARG = "x-dead-letter-routing-key";
31+
private static final String DLX_ARG = "x-dead-letter-exchange";
32+
private static final String DLX_RK_ARG = "x-dead-letter-routing-key";
3333
public static final String TEST_QUEUE_NAME = "test.queue.dead.letter";
3434
public static final String DLQ = "queue.dlq";
35-
public static final String DLQ2 = "queue.dlq2";
35+
private static final String DLQ2 = "queue.dlq2";
3636
public static final int MSG_COUNT = 10;
37-
public static final int TTL = 1000;
37+
private static final int TTL = 1000;
3838

3939
@Override
4040
protected void createResources() throws IOException {
@@ -47,6 +47,7 @@ protected void createResources() throws IOException {
4747
@Override
4848
protected void releaseResources() throws IOException {
4949
channel.exchangeDelete(DLX);
50+
channel.queueDelete(TEST_QUEUE_NAME);
5051
}
5152

5253
@Test public void declareQueueWithExistingDeadLetterExchange()
@@ -605,7 +606,7 @@ private void declareQueue(String queue, Object deadLetterExchange,
605606
if (deadLetterRoutingKey != null) {
606607
args.put(DLX_RK_ARG, deadLetterRoutingKey);
607608
}
608-
channel.queueDeclare(queue, false, true, false, args);
609+
channel.queueDeclare(queue, false, false, false, args);
609610
}
610611

611612
private void publishN(int n) throws IOException {

0 commit comments

Comments
 (0)