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 2015/08/27 16:11:55 UTC

qpid-jms git commit: QPIDJMS-98 Make the testNonTxProducerRecoversAfterFailover a bit quicker and more reliable on slow CI.

Repository: qpid-jms
Updated Branches:
  refs/heads/master b42f12ea2 -> 5c59b2739


QPIDJMS-98  Make the testNonTxProducerRecoversAfterFailover a bit
quicker and more reliable on slow CI.


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/5c59b273
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/5c59b273
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/5c59b273

Branch: refs/heads/master
Commit: 5c59b27398d34abd9fab44028a3f02d0af31e32a
Parents: b42f12e
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Aug 27 10:11:27 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Aug 27 10:11:41 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/qpid/jms/failover/JmsFailoverTest.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5c59b273/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/JmsFailoverTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/JmsFailoverTest.java b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/JmsFailoverTest.java
index 5001c28..4a0c10b 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/JmsFailoverTest.java
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/src/test/java/org/apache/qpid/jms/failover/JmsFailoverTest.java
@@ -274,7 +274,9 @@ public class JmsFailoverTest extends AmqpTestSupport {
                         LOG.debug("Producer sening message #{}", i + 1);
                         producer.send(session.createTextMessage("Message: " + i));
                         sentSome.countDown();
-                        TimeUnit.MILLISECONDS.sleep(50);
+                        if (sentSome.getCount() > 0) {
+                            TimeUnit.MILLISECONDS.sleep(50);
+                        }
                     }
                 } catch (Exception e) {
                     failed.countDown();
@@ -284,7 +286,7 @@ public class JmsFailoverTest extends AmqpTestSupport {
         producerThread.start();
 
         // Wait until a couple messages get sent on first broker run.
-        assertTrue(sentSome.await(3, TimeUnit.SECONDS));
+        assertTrue(sentSome.await(6, TimeUnit.SECONDS));
         stopPrimaryBroker();
         TimeUnit.SECONDS.sleep(2);  // Gives FailoverProvider some CPU time
         restartPrimaryBroker();


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