diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-29 22:50:10 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-29 22:50:10 +0000 |
| commit | 7163d17d292d3b7781b9b42071b9ba93cad95bbf (patch) | |
| tree | 45f59a71faedc626e13a8c106c82bbd5ecd013a9 /java | |
| parent | f1d016d238c70973b6392507a5d46b985b9b0886 (diff) | |
| download | qpid-python-7163d17d292d3b7781b9b42071b9ba93cad95bbf.tar.gz | |
QPID-3194 Added a test case to verify the alternate-exchange property is correctly parsed and used when declaring exchanges and queues.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1141301 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java b/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java index fb389c5345..5dac9fb7c3 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java @@ -1069,4 +1069,24 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase Message m1 = replyToCons.receive(); assertNotNull("The reply to consumer should have received the messsage",m1); } + + public void testAltExchangeInAddressString() throws Exception + { + String addr1 = "ADDR:my-exchange/test; {create: always, node:{type: topic,x-declare:{alternate-exchange:'amq.fanout'}}}"; + Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + String altQueueAddr = "ADDR:my-alt-queue;{create: always, delete: receiver,node:{x-bindings:[{exchange:'amq.fanout'}] }}"; + MessageConsumer cons = session.createConsumer(session.createQueue(altQueueAddr)); + + MessageProducer prod = session.createProducer(session.createTopic(addr1)); + prod.send(session.createMessage()); + prod.close(); + assertNotNull("The consumer on the queue bound to the alt-exchange should receive the message",cons.receive(1000)); + + String addr2 = "ADDR:test-queue;{create:sender, delete: sender,node:{type:queue,x-declare:{alternate-exchange:'amq.fanout'}}}"; + prod = session.createProducer(session.createTopic(addr2)); + prod.send(session.createMessage()); + prod.close(); + assertNotNull("The consumer on the queue bound to the alt-exchange should receive the message",cons.receive(1000)); + cons.close(); + } } |
