This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new ef67ea0e26 NO-JIRA Fixing intermittent failure on JMSTransactionTest
ef67ea0e26 is described below

commit ef67ea0e26f7282b0e4971afb93ae99523a57ebe
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue Dec 13 13:33:23 2022 -0500

    NO-JIRA Fixing intermittent failure on JMSTransactionTest
    
    We can't block the netty thread (which is used by the Listener) otherwise 
everything just blocks and nothing works on the client
---
 .../activemq/artemis/tests/integration/client/JMSTransactionTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSTransactionTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSTransactionTest.java
index d79ea775c3..0f8ab8b2f5 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSTransactionTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSTransactionTest.java
@@ -33,6 +33,7 @@ import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 public class JMSTransactionTest extends JMSTestBase {
@@ -70,7 +71,7 @@ public class JMSTransactionTest extends JMSTestBase {
                @Override
                public void onCompletion(Message message) {
                   try {
-                     commitLatch.await();
+                     commitLatch.await(100, TimeUnit.MILLISECONDS); // can't 
block the netty thread. We will delay things, but can't block it otherwise the 
test just blocks
                      sentMessages.incrementAndGet();
                   } catch (Exception e) {
                      e.printStackTrace();

Reply via email to