Skip to content

Commit ee0ff23

Browse files
committed
Fail test if exception not thrown on priority queue creation
Part of rabbitmq/rabbitmq-server#1590. [#157380396]
1 parent eafb9df commit ee0ff23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/com/rabbitmq/client/test/server/PriorityQueues.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package com.rabbitmq.client.test.server;
1717

1818
import static org.junit.Assert.assertEquals;
19+
import static org.junit.Assert.fail;
1920

2021
import java.io.IOException;
2122
import java.util.ArrayList;
@@ -53,6 +54,7 @@ public class PriorityQueues extends BrokerTestCase {
5354
int n = -10;
5455
try {
5556
channel.queueDeclare(q, true, false, false, argsWithPriorities(n));
57+
fail("Negative priority, the queue creation should have failed");
5658
} catch (IOException ioe) {
5759
checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
5860
}
@@ -63,6 +65,7 @@ public class PriorityQueues extends BrokerTestCase {
6365
int n = 260;
6466
try {
6567
channel.queueDeclare(q, true, false, false, argsWithPriorities(n));
68+
fail("Priority too high (> 255), the queue creation should have failed");
6669
} catch (IOException ioe) {
6770
checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
6871
}

0 commit comments

Comments
 (0)