You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2019/05/14 16:28:16 UTC

[qpid-jms] branch master updated: NO-JIRA make use of the ActiveMQ test repeat rule for repeated tests

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

tabish pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/master by this push:
     new 30f5132  NO-JIRA make use of the ActiveMQ test repeat rule for repeated tests
30f5132 is described below

commit 30f5132b2c28ff29023bdd00153c34385a3e2e31
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Tue May 14 12:16:23 2019 -0400

    NO-JIRA make use of the ActiveMQ test repeat rule for repeated tests
    
    Use a test repeat rule which will setup and teardown properly between
    each test run instead of running in a tight loop to give broker setup
    and teardown a proper cycle on each iteration.
---
 .../qpid/jms/JmsConnectionCloseVariationsTest.java       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/JmsConnectionCloseVariationsTest.java b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/JmsConnectionCloseVariationsTest.java
index 2196186..653635d 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/JmsConnectionCloseVariationsTest.java
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/JmsConnectionCloseVariationsTest.java
@@ -18,12 +18,16 @@ package org.apache.qpid.jms;
 
 import javax.jms.Connection;
 
+import org.apache.activemq.junit.ActiveMQTestRunner;
+import org.apache.activemq.junit.Repeat;
 import org.apache.qpid.jms.support.AmqpTestSupport;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * A test case for Connection close called under different circumstances.
  */
+@RunWith(ActiveMQTestRunner.class)
 public class JmsConnectionCloseVariationsTest extends AmqpTestSupport {
 
     @Test(timeout=60000)
@@ -31,12 +35,10 @@ public class JmsConnectionCloseVariationsTest extends AmqpTestSupport {
         doTestConnectionClosedAfterBrokerStopped();
     }
 
+    @Repeat(repetitions = 25)
     @Test(timeout=90000)
     public void testCloseAfterBrokerStoppedRepeated() throws Exception {
-        for (int i = 0; i < 50; ++i) {
-            doTestConnectionClosedAfterBrokerStopped();
-            restartPrimaryBroker();
-        }
+        doTestConnectionClosedAfterBrokerStopped();
     }
 
     private void doTestConnectionClosedAfterBrokerStopped() throws Exception {
@@ -51,12 +53,10 @@ public class JmsConnectionCloseVariationsTest extends AmqpTestSupport {
         doTestConnectionClosedBeforeBrokerStopped();
     }
 
+    @Repeat(repetitions = 25)
     @Test(timeout=90000)
     public void testCloseBeforeBrokerStoppedRepeated() throws Exception {
-        for (int i = 0; i < 50; ++i) {
-            doTestConnectionClosedBeforeBrokerStopped();
-            restartPrimaryBroker();
-        }
+        doTestConnectionClosedBeforeBrokerStopped();
     }
 
     private void doTestConnectionClosedBeforeBrokerStopped() throws Exception {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org