Github user jbertram commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/982#discussion_r98761564
--- Diff:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/addressing/AddressingTest.java
---
@@ -224,37 +224,30 @@ public void testMulticastRoutingBackwardsCompat()
throws Exception {
@Test
public void testPurgeOnNoConsumersTrue() throws Exception {
-
SimpleString address = new SimpleString("test.address");
SimpleString queueName =
SimpleString.toSimpleString(UUID.randomUUID().toString());
- // For each address, create 2 Queues with the same address, assert
both queues receive message
- boolean purgeOnNoConsumers = true;
- Queue q1 = server.createQueue(address, RoutingType.MULTICAST,
queueName, null, true, false, Queue.MAX_CONSUMERS_UNLIMITED,
purgeOnNoConsumers, true);
-
+ server.createQueue(address, RoutingType.ANYCAST, queueName, null,
null, true, false, false, false, false, 1, true, true);
+ assertNotNull(server.locateQueue(queueName));
ClientSession session = sessionFactory.createSession();
- session.start();
-
- ClientConsumer consumer1 = session.createConsumer(q1.getName());
- consumer1.close();
-
- assertFalse(server.queueQuery(queueName).isExists());
+ ClientProducer producer = session.createProducer(address);
+ producer.send(session.createMessage(true));
+ session.createConsumer(queueName).close();
--- End diff --
Creating the consumer here should be synchronous as "requiresResponse" is
set to true on the packet to create the consumer.
---
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.
---