Skip to content

Commit 881b3e2

Browse files
Test queue recovery with no-wait = true
1 parent 386b136 commit 881b3e2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ public void testClientNamedQueueRecovery() throws IOException, InterruptedExcept
176176
ch.queueDelete(q);
177177
}
178178

179+
public void testClientNamedQueueRecoveryWithNoWait() throws IOException, InterruptedException, TimeoutException {
180+
Channel ch = connection.createChannel();
181+
String q = "java-client.test.recovery.q1-nowait";
182+
declareClientNamedQueueNoWait(ch, q);
183+
closeAndWaitForRecovery();
184+
expectChannelRecovery(ch);
185+
expectQueueRecovery(ch, q);
186+
ch.queueDelete(q);
187+
}
188+
179189
public void testServerNamedQueueRecovery() throws IOException, InterruptedException {
180190
String q = channel.queueDeclare("", false, false, false, null).getQueue();
181191
String x = "amq.fanout";
@@ -377,6 +387,10 @@ private AMQP.Queue.DeclareOk declareClientNamedQueue(Channel ch, String q) throw
377387
return ch.queueDeclare(q, true, false, false, null);
378388
}
379389

390+
private void declareClientNamedQueueNoWait(Channel ch, String q) throws IOException {
391+
ch.queueDeclareNoWait(q, true, false, false, null);
392+
}
393+
380394
private AMQP.Exchange.DeclareOk declareExchange(Channel ch, String x) throws IOException {
381395
return ch.exchangeDeclare(x, "fanout", false);
382396
}

0 commit comments

Comments
 (0)