Skip to content

Commit 2ea7e53

Browse files
author
Matthew Sackman
committed
Redeclaring the default exchange is forbidden
1 parent 0812f0e commit 2ea7e53

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ public void testBindToDefaultExchange() throws IOException {
3535
}
3636

3737
public void testDeclareDefaultExchange() throws IOException {
38-
channel.exchangeDeclare("", "direct", true);
38+
try {
39+
channel.exchangeDeclare("", "direct", true);
40+
fail();
41+
} catch (IOException ioe) {
42+
checkShutdownSignal(AMQP.ACCESS_REFUSED, ioe);
43+
}
3944
}
4045

4146
public void testDeleteDefaultExchange() throws IOException {

0 commit comments

Comments
 (0)