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

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

commit 793a45f35a8fe5eca7df9e9657d89e93cf0bcdd2
Author: Clebert Suconic <clebertsuco...@apache.org>
AuthorDate: Wed Sep 11 09:36:53 2019 -0400

    NO-JIRA Speeding up JMSNonDestructiveTest
---
 .../artemis/tests/integration/amqp/JMSNonDestructiveTest.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSNonDestructiveTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSNonDestructiveTest.java
index 6fbb71d..9b31b79 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSNonDestructiveTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSNonDestructiveTest.java
@@ -332,7 +332,7 @@ public class JMSNonDestructiveTest extends 
JMSClientTestSupport {
             assertNotNull(msg);
             assertEquals(Integer.toString(j), msg.getText());
          }
-         TextMessage msg = (TextMessage) consumer.receive(200);
+         TextMessage msg = (TextMessage) consumer.receiveNoWait();
          assertNull(msg);
          consumer.close();
       }
@@ -356,7 +356,7 @@ public class JMSNonDestructiveTest extends 
JMSClientTestSupport {
          Session consumerSession = consumerConnection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
          Queue consumerQueue = consumerSession.createQueue(queueName);
          MessageConsumer consumer = 
consumerSession.createConsumer(consumerQueue);
-         TextMessage msg = (TextMessage) consumer.receive(2000);
+         TextMessage msg = (TextMessage) consumer.receiveNoWait();
          assertNull(msg);
          consumer.close();
       }
@@ -395,9 +395,9 @@ public class JMSNonDestructiveTest extends 
JMSClientTestSupport {
             assertEquals(Integer.toString(j), msg.getText());
             assertEquals(Integer.toString(j), msg2.getText());
          }
-         TextMessage msg = (TextMessage) consumer.receive(200);
+         TextMessage msg = (TextMessage) consumer.receiveNoWait();
          assertNull(msg);
-         TextMessage msg2 = (TextMessage) consumer2.receive(200);
+         TextMessage msg2 = (TextMessage) consumer2.receiveNoWait();
          assertNull(msg2);
          consumer.close();
          consumer2.close();
@@ -468,7 +468,7 @@ public class JMSNonDestructiveTest extends 
JMSClientTestSupport {
       try (Connection connection = 
consumerConnectionSupplier.createConnection();
            Session session = connection.createSession();
            MessageConsumer consumer = 
session.createConsumer(session.createQueue(queueName))) {
-         TextMessage msg = (TextMessage) consumer.receive(1000);
+         TextMessage msg = (TextMessage) consumer.receiveNoWait();
          assertNull(msg);
       }
    }

Reply via email to