You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2014/08/06 15:23:07 UTC
git commit: https://issues.apache.org/jira/browse/AMQ-5304 -
providing test case
Repository: activemq
Updated Branches:
refs/heads/trunk 052d29314 -> acf84b43e
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/acf84b43
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/acf84b43
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/acf84b43
Branch: refs/heads/trunk
Commit: acf84b43e9b7c8aaf92784569075f00e83cf4809
Parents: 052d293
Author: Dejan Bosanac <de...@nighttale.net>
Authored: Wed Aug 6 15:22:16 2014 +0200
Committer: Dejan Bosanac <de...@nighttale.net>
Committed: Wed Aug 6 15:22:16 2014 +0200
----------------------------------------------------------------------
.../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/acf84b43/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 de9edc9..1677ea4 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.Configuration;
import org.ops4j.pax.exam.junit.PaxExam;
+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(PaxExam.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/acf84b43/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>