[ 
https://issues.apache.org/jira/browse/ARTEMIS-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-1800:
------------------------------------
    Description: 
This will reproduce the failure if added to 
{{org.apache.activemq.artemis.tests.integration.management.QueueControlTest}}:
{noformat}
   @Test
   public void testGetScheduledCountOnRemove() throws Exception {
      long delay = Integer.MAX_VALUE;
      SimpleString address = RandomUtil.randomSimpleString();
      SimpleString queue = RandomUtil.randomSimpleString();

      session.createQueue(address, RoutingType.MULTICAST, queue, null, durable);

      QueueControl queueControl = createManagementControl(address, queue);
      Assert.assertEquals(0, queueControl.getScheduledCount());

      ClientProducer producer = session.createProducer(address);
      ClientMessage message = session.createMessage(durable);
      message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
System.currentTimeMillis() + delay);
      producer.send(message);

      queueControl.removeAllMessages();

      Assert.assertEquals(0, queueControl.getMessageCount());

      session.deleteQueue(queue);
   }
{noformat}

> Incorrect number of messages on queue after remove of scheduled message
> -----------------------------------------------------------------------
>
>                 Key: ARTEMIS-1800
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1800
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.5.0
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>
> This will reproduce the failure if added to 
> {{org.apache.activemq.artemis.tests.integration.management.QueueControlTest}}:
> {noformat}
>    @Test
>    public void testGetScheduledCountOnRemove() throws Exception {
>       long delay = Integer.MAX_VALUE;
>       SimpleString address = RandomUtil.randomSimpleString();
>       SimpleString queue = RandomUtil.randomSimpleString();
>       session.createQueue(address, RoutingType.MULTICAST, queue, null, 
> durable);
>       QueueControl queueControl = createManagementControl(address, queue);
>       Assert.assertEquals(0, queueControl.getScheduledCount());
>       ClientProducer producer = session.createProducer(address);
>       ClientMessage message = session.createMessage(durable);
>       message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
> System.currentTimeMillis() + delay);
>       producer.send(message);
>       queueControl.removeAllMessages();
>       Assert.assertEquals(0, queueControl.getMessageCount());
>       session.deleteQueue(queue);
>    }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to