Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1320#discussion_r120735133
--- Diff:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
---
@@ -1467,6 +1468,27 @@ public void testTempQueueSendAfterConnectionClose()
throws Exception {
}
}
+ @Test
+ public void testNotificationProperties() throws Exception {
+ try (TopicConnection topicConnection =
factory.createTopicConnection()) {
+ TopicSession topicSession =
topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
+ Topic notificationsTopic =
topicSession.createTopic("activemq.notifications");
+ TopicSubscriber subscriber =
topicSession.createSubscriber(notificationsTopic);
+ List<Message> receivedMessages = new ArrayList<>();
+ subscriber.setMessageListener(receivedMessages::add);
+ topicConnection.start();
+
+ while (receivedMessages.size() == 0) {
--- End diff --
More as learning exercise (since I could change this myself)...
you could use this:
```java
import org.apache.activemq.artemis.tests.util.Wait;
...
Wait.waitFor(() -> receivedMessages.size() > 0);
Assert.assertTrue(receivedMessages.size() > 0);
```
---
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.
---