activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [12/17] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5304 - providing test case
Date Wed, 17 Dec 2014 23:36:27 GMT
https://issues.apache.org/jira/browse/AMQ-5304 - providing test case


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/6bb5abfc
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/6bb5abfc
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/6bb5abfc

Branch: refs/heads/activemq-5.10.x
Commit: 6bb5abfcf4706629090f6b0c39f7a523a14866e0
Parents: 07bfc1e
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Wed Aug 6 15:22:16 2014 +0200
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Wed Dec 17 16:45:03 2014 -0500

----------------------------------------------------------------------
 .../karaf/itest/ActiveMQBrokerFeatureTest.java     | 17 +++++++++++++++++
 .../org/apache/activemq/karaf/itest/activemq.xml   |  4 ++++
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6bb5abfc/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
----------------------------------------------------------------------
diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
index bdc0cd7..0f84c1b 100644
--- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
+++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
@@ -23,7 +23,13 @@ import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 @RunWith(JUnit4TestRunner.class)
@@ -63,4 +69,15 @@ public class ActiveMQBrokerFeatureTest extends AbstractJmsFeatureTest {
         assertEquals("got our message", nameAndPayload, consumeMessage(nameAndPayload));
     }
 
+    @Test
+    public void testTemporaryDestinations() throws Throwable {
+        Connection connection = getConnection();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        TemporaryQueue temporaryQueue = session.createTemporaryQueue();
+        session.createProducer(temporaryQueue).send(session.createTextMessage("TEST"));
+        Message msg = session.createConsumer(temporaryQueue).receive(3000);
+        assertNotNull("Didn't receive the message", msg);
+        connection.close();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/6bb5abfc/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
----------------------------------------------------------------------
diff --git a/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
b/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
index 8932dfc..714b9fc 100644
--- a/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
+++ b/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
@@ -62,6 +62,10 @@
                     <authorizationEntry topic=">" read="admin" write="admin" admin="admin"/>
                     <authorizationEntry topic="ActiveMQ.Advisory.>" read="admin" write="admin"
admin="admin"/>
                   </authorizationEntries>
+
+                  <tempDestinationAuthorizationEntry>
+                    <tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/>
+                  </tempDestinationAuthorizationEntry>
                 </authorizationMap>
               </map>
             </authorizationPlugin>


Mime
View raw message