Skip to content

Commit 59abe04

Browse files
author
Matthew Sackman
committed
Merging bug21843 into default
2 parents 16907fe + ff87947 commit 59abe04

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
@@ -60,6 +60,7 @@ public static TestSuite suite() {
6060
suite.addTestSuite(QueueExclusivity.class);
6161
suite.addTestSuite(InvalidAcks.class);
6262
suite.addTestSuite(InvalidAcksTx.class);
63+
suite.addTestSuite(BindToDefaultExchange.class);
6364
return suite;
6465
}
6566
}

0 commit comments

Comments
 (0)