You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2019/06/13 16:02:55 UTC
[activemq-artemis] branch master updated: NO-JIRA make
ExceptionListenerForConnectionTimedOutExceptionTest more robust
This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 75a6851 NO-JIRA make ExceptionListenerForConnectionTimedOutExceptionTest more robust
75a6851 is described below
commit 75a68511fa74ed236319950913b23ee2e424d68c
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Thu Jun 13 11:00:57 2019 -0500
NO-JIRA make ExceptionListenerForConnectionTimedOutExceptionTest more robust
---
.../ExceptionListenerForConnectionTimedOutExceptionTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java
index 5b5875b..5728d30 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java
@@ -30,6 +30,7 @@ import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.core.protocol.core.Packet;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.junit.Wait;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.tests.util.JMSTestBase;
import org.junit.Before;
@@ -86,7 +87,7 @@ public class ExceptionListenerForConnectionTimedOutExceptionTest extends JMSTest
} catch (JMSException e) {
assertTrue(e.getCause() instanceof ActiveMQConnectionTimedOutException);
//Ensure JMS Connection ExceptionListener was also invoked
- assertNotNull(exceptionOnConnection.get());
+ assertTrue(Wait.waitFor(() -> exceptionOnConnection.get() != null, 2000, 100));
assertTrue(exceptionOnConnection.get().getCause() instanceof ActiveMQConnectionTimedOutException);
} finally {
if (connection != null) {
@@ -124,7 +125,7 @@ public class ExceptionListenerForConnectionTimedOutExceptionTest extends JMSTest
} catch (JMSException e) {
assertTrue(e.getCause() instanceof ActiveMQConnectionTimedOutException);
//Ensure JMS Connection ExceptionListener was also invoked
- assertNotNull(exceptionOnConnection.get());
+ assertTrue(Wait.waitFor(() -> exceptionOnConnection.get() != null, 2000, 100));
assertTrue(exceptionOnConnection.get().getCause() instanceof ActiveMQConnectionTimedOutException);
} finally {