Github user gnodet commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1307#discussion_r119338658
--- Diff:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
---
@@ -146,11 +155,26 @@ public Boolean call() throws Exception {
connection = factory.createConnection(USER, PASSWORD);
connection.start();
- javax.jms.Session sess = connection.createSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE);
+ QueueSession sess = (QueueSession)
connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
Queue queue = sess.createQueue("exampleQueue");
MessageProducer producer = sess.createProducer(queue);
producer.send(sess.createTextMessage("TEST"));
+ // Test management
+ Queue managementQueue = sess.createQueue("activemq.management");
+ QueueRequestor requestor = new QueueRequestor(sess,
managementQueue);
+ connection.start();
+ TextMessage m = sess.createTextMessage();
+ m.setStringProperty("_AMQ_ResourceName", "broker");
+ m.setStringProperty("_AMQ_OperationName", "getQueueNames");
+ m.setText("[\"ANYCAST\"]");
+ Message reply = requestor.request(m);
+ String json = ((TextMessage) reply).getText();
+ JsonArray array = Json.createReader(new
StringReader(json)).readArray();
+ List<JsonString> queues = (List<JsonString>) array.get(0);
+ assertNotNull(queues);
+
System.out.println(queues.stream().map(JsonString::getString).collect(Collectors.joining(",
", "Queues: ", "")));
--- End diff --
The test already spits out lots of things to the console, so I'm happy to
remove that line if you want, though it's really burried in the whole test
output.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---