You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/05/31 15:57:22 UTC
[2/2] activemq-artemis git commit: [ARTEMIS-1197] Add missing role to
default OSGi configuration
[ARTEMIS-1197] Add missing role to default OSGi configuration
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/71fc3a8b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/71fc3a8b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/71fc3a8b
Branch: refs/heads/master
Commit: 71fc3a8bb5e6d0da4a1ba889a6c7e62e7143a60f
Parents: 2d8c8d4
Author: Guillaume Nodet <gn...@apache.org>
Authored: Fri May 19 10:00:59 2017 +0200
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed May 31 11:57:14 2017 -0400
----------------------------------------------------------------------
artemis-features/src/main/resources/artemis.xml | 1 +
.../tests/integration/karaf/ArtemisFeatureTest.java | 10 ++++++++++
2 files changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/71fc3a8b/artemis-features/src/main/resources/artemis.xml
----------------------------------------------------------------------
diff --git a/artemis-features/src/main/resources/artemis.xml b/artemis-features/src/main/resources/artemis.xml
index c54a289..44f1475 100644
--- a/artemis-features/src/main/resources/artemis.xml
+++ b/artemis-features/src/main/resources/artemis.xml
@@ -84,6 +84,7 @@ under the License.
<permission type="deleteAddress" roles="manager"/>
<permission type="consume" roles="manager"/>
<permission type="send" roles="manager"/>
+ <permission type="browse" roles="manager"/>
<!-- we need this otherwise ./artemis data imp wouldn't work -->
<permission type="manage" roles="manager"/>
</security-setting>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/71fc3a8b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
index 02a412c..50566f1 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
@@ -22,6 +22,7 @@ import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
+import javax.jms.QueueBrowser;
import javax.security.auth.Subject;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -29,6 +30,7 @@ import java.io.PrintStream;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Enumeration;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -151,6 +153,14 @@ public class ArtemisFeatureTest extends Assert {
MessageProducer producer = sess.createProducer(queue);
producer.send(sess.createTextMessage("TEST"));
+ // Test browsing
+ try (QueueBrowser browser = sess.createBrowser(queue)) {
+ Enumeration messages = browser.getEnumeration();
+ while (messages.hasMoreElements()) {
+ messages.nextElement();
+ }
+ }
+
MessageConsumer consumer = sess.createConsumer(queue);
Message msg = consumer.receive(5000);
assertNotNull(msg);