File tree Expand file tree Collapse file tree 3 files changed +46
-20
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 3 files changed +46
-20
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com .rabbitmq .client .test .functional ;
2+
3+ import com .rabbitmq .client .AMQP ;
4+ import com .rabbitmq .client .test .BrokerTestCase ;
5+
6+ import java .io .IOException ;
7+
8+ /**
9+ * See bug 21843. It's not obvious this is the right thing to do, but it's in
10+ * the spec.
11+ */
12+ public class DefaultExchange extends BrokerTestCase {
13+ String queueName ;
14+
15+ @ Override
16+ protected void createResources () throws IOException {
17+ queueName = channel .queueDeclare ().getQueue ();
18+ }
19+
20+ // See bug 22101: publish is the only operation permitted on the
21+ // default exchange
22+
23+ public void testDefaultExchangePublish () throws IOException {
24+ basicPublishVolatile ("" , queueName ); // Implicit binding
25+ assertDelivered (queueName , 1 );
26+ }
27+
28+ public void testBindToDefaultExchange () throws IOException {
29+ try {
30+ channel .queueBind (queueName , "" , "foobar" );
31+ fail ();
32+ } catch (IOException ioe ) {
33+ checkShutdownSignal (AMQP .ACCESS_REFUSED , ioe );
34+ }
35+ }
36+
37+ public void testConfigureDefaultExchange () throws IOException {
38+ try {
39+ channel .exchangeDeclare ("" , "direct" , true );
40+ fail ();
41+ } catch (IOException ioe ) {
42+ checkShutdownSignal (AMQP .ACCESS_REFUSED , ioe );
43+ }
44+ }
45+ }
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public static TestSuite suite() {
6363 suite .addTestSuite (QueueExclusivity .class );
6464 suite .addTestSuite (InvalidAcks .class );
6565 suite .addTestSuite (InvalidAcksTx .class );
66- suite .addTestSuite (BindToDefaultExchange .class );
66+ suite .addTestSuite (DefaultExchange .class );
6767 suite .addTestSuite (UnbindAutoDeleteExchange .class );
6868 suite .addTestSuite (RecoverAfterCancel .class );
6969 suite .addTestSuite (UnexpectedFrames .class );
You can’t perform that action at this time.
0 commit comments