Github user gaohoward commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2049#discussion_r184700517
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSDurableConsumerTest.java
 ---
    @@ -221,4 +224,66 @@ public void 
testDurableConsumerUnsubscribeWhileActive() throws Exception {
              connection.close();
           }
        }
    +
    +   @Test(timeout = 30000)
    +   public void testDurableConsumerLarge() throws Exception {
    +      String durableClientId = getTopicName() + "-ClientId";
    +
    +      Connection connection = createConnection(durableClientId);
    +      try {
    +         Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
    +         Topic topic = session.createTopic(getTopicName());
    +         final MessageConsumer consumer1 = 
session.createDurableSubscriber(topic, "DurbaleSub1");
    +         final MessageConsumer consumer2 = 
session.createDurableSubscriber(topic, "DurbaleSub2");
    +         MessageProducer producer = session.createProducer(topic);
    +         producer.setDeliveryMode(DeliveryMode.PERSISTENT);
    +         connection.start();
    +
    +         ObjectMessage objMessage = session.createObjectMessage();
    +         BigObject bigObject = new 
BigObject(ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
    +         objMessage.setObject(bigObject);
    +         producer.send(objMessage);
    +
    +         final AtomicReference<Message> msg1 = new AtomicReference<>();
    +         final AtomicReference<Message> msg2 = new AtomicReference<>();
    +
    +         assertTrue(Wait.waitFor(new Wait.Condition() {
    +
    +            @Override
    +            public boolean isSatisfied() throws Exception {
    +               msg1.set(consumer1.receiveNoWait());
    +               return msg1.get() != null;
    +            }
    +         }, TimeUnit.SECONDS.toMillis(25), 
TimeUnit.MILLISECONDS.toMillis(200)));
    --- End diff --
    
    Thanks, I just copy/modify from other test and didn't think much of it. :)


---

Reply via email to