Author: rajith
Date: Mon Mar 14 16:58:07 2011
New Revision: 1081467
URL: http://svn.apache.org/viewvc?rev=1081467&view=rev
Log:
QPID-3109
Added a test case to cover a producer created with a null destination (where a
valid destination is supplied each time send is invoked).
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java?rev=1081467&r1=1081466&r2=1081467&view=diff
==============================================================================
---
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
(original)
+++
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
Mon Mar 14 16:58:07 2011
@@ -1004,4 +1004,20 @@ public class AddressBasedDestinationTest
cons.close();
prod.close();
}
+
+ public void testDestinationOnSend() throws Exception
+ {
+ Session ssn =
_connection.createSession(false,Session.CLIENT_ACKNOWLEDGE);
+ MessageConsumer cons =
ssn.createConsumer(ssn.createTopic("amq.topic/test"));
+ MessageProducer prod = ssn.createProducer(null);
+
+ Queue queue = ssn.createQueue("amq.topic/test");
+ prod.send(queue,ssn.createTextMessage("A"));
+
+ Message msg = cons.receive(1000);
+ assertNotNull(msg);
+ assertEquals("A",((TextMessage)msg).getText());
+ prod.close();
+ cons.close();
+ }
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]