Skip to content

Commit b35b6b7

Browse files
author
Alexandru Scvortov
committed
extend default exchange java tests
1 parent 960d924 commit b35b6b7

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ protected void createResources() throws IOException {
1717
queueName = channel.queueDeclare().getQueue();
1818
}
1919

20-
// See bug 22101: publish is the only operation permitted on the
21-
// default exchange
20+
// See bug 22101: publish and declare are the only operations
21+
// permitted on the default exchange
2222

2323
public void testDefaultExchangePublish() throws IOException {
2424
basicPublishVolatile("", queueName); // Implicit binding
@@ -34,8 +34,22 @@ public void testBindToDefaultExchange() throws IOException {
3434
}
3535
}
3636

37-
public void testConfigureDefaultExchange() throws IOException {
37+
public void testDeclareDefaultExchange() throws IOException {
3838
channel.exchangeDeclare("", "direct", true);
39-
channel.exchangeDeclare("amq.default", "direct", true);
39+
}
40+
41+
public void testDeleteDefaultExchange() throws IOException {
42+
try {
43+
channel.exchangeDelete("");
44+
fail();
45+
} catch (IOException ioe) {
46+
checkShutdownSignal(AMQP.ACCESS_REFUSED, ioe);
47+
}
48+
try {
49+
channel.exchangeDelete("amq.default");
50+
} catch (IOException ioe) {
51+
checkShutdownSignal(AMQP.ACCESS_REFUSED, ioe);
52+
}
53+
4054
}
4155
}

0 commit comments

Comments
 (0)