Skip to content

Commit 66867ff

Browse files
committed
check for error when rejecting an unknown delivery tag
The spec is silent on this, but it's fair guess that the error should be the same as for basic.ack
1 parent 5fe09ed commit 66867ff

File tree

1 file changed

+8
-0
lines changed
  • test/src/com/rabbitmq/client/test/functional

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import com.rabbitmq.client.test.BrokerTestCase;
3535

36+
import com.rabbitmq.client.AMQP;
3637
import com.rabbitmq.client.QueueingConsumer;
3738
import com.rabbitmq.client.QueueingConsumer.Delivery;
3839

@@ -72,5 +73,12 @@ public void testReject()
7273
channel.basicReject(tag3, false);
7374
assertNull(channel.basicGet(q, false));
7475
channel.basicAck(tag1, false);
76+
channel.basicReject(tag3, false);
77+
try {
78+
channel.basicQos(0); //some synchronous command
79+
fail();
80+
} catch (IOException ioe) {
81+
checkShutdownSignal(AMQP.NOT_FOUND, ioe);
82+
}
7583
}
7684
}

0 commit comments

Comments
 (0)