Skip to content

Commit ff87947

Browse files
author
Simon MacMullen
committed
Add a test to make what we already do apparent.
1 parent 2d74335 commit ff87947

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.rabbitmq.client.test.functional;
2+
3+
import com.rabbitmq.client.test.BrokerTestCase;
4+
5+
import java.io.IOException;
6+
7+
/**
8+
* See bug 21843. It's not obvious this is the right thing to do, but it's in
9+
* the spec.
10+
*/
11+
public class BindToDefaultExchange extends BrokerTestCase {
12+
public void testBindToDefaultExchange() throws IOException {
13+
String queue = channel.queueDeclare().getQueue();
14+
channel.queueBind(queue, "", "foobar");
15+
basicPublishVolatile("", "foobar"); // Explicit binding
16+
basicPublishVolatile("", queue); // Implicit binding
17+
assertDelivered(queue, 2);
18+
}
19+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public static TestSuite suite() {
5858
suite.addTestSuite(QueueExclusivity.class);
5959
suite.addTestSuite(InvalidAcks.class);
6060
suite.addTestSuite(InvalidAcksTx.class);
61+
suite.addTestSuite(BindToDefaultExchange.class);
6162
return suite;
6263
}
6364
}

0 commit comments

Comments
 (0)