Skip to content

Commit dae7b13

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
1 parent 0c25c3c commit dae7b13

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
@@ -29,13 +29,13 @@
2929

3030
public class DeadLetterExchange extends BrokerTestCase {
3131
public static final String DLX = "dead.letter.exchange";
32-
public static final String DLX_ARG = "x-dead-letter-exchange";
33-
public static final String DLX_RK_ARG = "x-dead-letter-routing-key";
32+
private static final String DLX_ARG = "x-dead-letter-exchange";
33+
private static final String DLX_RK_ARG = "x-dead-letter-routing-key";
3434
public static final String TEST_QUEUE_NAME = "test.queue.dead.letter";
3535
public static final String DLQ = "queue.dlq";
36-
public static final String DLQ2 = "queue.dlq2";
36+
private static final String DLQ2 = "queue.dlq2";
3737
public static final int MSG_COUNT = 10;
38-
public static final int TTL = 1000;
38+
private static final int TTL = 1000;
3939

4040
@Override
4141
protected void createResources() throws IOException {
@@ -48,6 +48,7 @@ protected void createResources() throws IOException {
4848
@Override
4949
protected void releaseResources() throws IOException {
5050
channel.exchangeDelete(DLX);
51+
channel.queueDelete(TEST_QUEUE_NAME);
5152
}
5253

5354
@Test public void declareQueueWithExistingDeadLetterExchange()
@@ -614,7 +615,7 @@ private void declareQueue(String queue, Object deadLetterExchange,
614615
if (deadLetterRoutingKey != null) {
615616
args.put(DLX_RK_ARG, deadLetterRoutingKey);
616617
}
617-
channel.queueDeclare(queue, false, true, false, args);
618+
channel.queueDeclare(queue, false, false, false, args);
618619
}
619620

620621
private void publishN(int n) throws IOException {

0 commit comments

Comments
 (0)