Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2049#discussion_r184699818
--- 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 --
never mind.. I'm fixing it.
---