activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #982: ARTEMIS-922 implement purge semantics
Date Tue, 31 Jan 2017 20:10:46 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/982#discussion_r98759149
  
    --- 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 --
    
    is this really synchronous? don't you need a Wait here?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message