activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-290 PageCountSyncOnNonTXTest.testSendNoTx: fails on slower machines
Date Fri, 30 Oct 2015 15:45:43 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 73f8fbf4c -> 0117a2943


ARTEMIS-290 PageCountSyncOnNonTXTest.testSendNoTx: fails on slower machines


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/effe95c0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/effe95c0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/effe95c0

Branch: refs/heads/master
Commit: effe95c0bad05e4888e9f71b9284213e191ede71
Parents: 73f8fbf
Author: Erich Duda <eduda@redhat.com>
Authored: Fri Oct 30 09:18:45 2015 +0100
Committer: Erich Duda <eduda@redhat.com>
Committed: Fri Oct 30 09:37:32 2015 +0100

----------------------------------------------------------------------
 .../paging/PageCountSyncOnNonTXTest.java            | 16 +++++++++++++++-
 .../integration/paging/PageCountSyncServer.java     |  5 +++++
 2 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/effe95c0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
index cd8be0b..ae68d0d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java
@@ -30,8 +30,13 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 public class PageCountSyncOnNonTXTest extends ActiveMQTestBase {
 
+   public static final String WORD_START = "&*STARTED&*";
+
    // We will add a random factor on the wait time
    private long timeToRun;
 
@@ -49,7 +54,16 @@ public class PageCountSyncOnNonTXTest extends ActiveMQTestBase {
    public void testSendNoTx() throws Exception {
       String QUEUE_NAME = "myQueue";
 
-      process = PageCountSyncServer.spawnVM(getTestDir(), timeToRun);
+      final CountDownLatch latch = new CountDownLatch(1);
+      Runnable runnable = new Runnable() {
+         @Override
+         public void run() {
+            latch.countDown();
+         }
+      };
+
+      process = PageCountSyncServer.spawnVMWithLogMacher(WORD_START, runnable, getTestDir(),
timeToRun);
+      assertTrue("Server didn't start in 30 seconds", latch.await(30, TimeUnit.SECONDS));
 
       ServerLocator locator = createNettyNonHALocator();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/effe95c0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncServer.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncServer.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncServer.java
index ab3e1bc..982dfe0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncServer.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncServer.java
@@ -30,6 +30,10 @@ public class PageCountSyncServer extends SpawnedServerSupport {
       return SpawnedVMSupport.spawnVM(PageCountSyncServer.class.getName(), testDir, "" +
timeToRun);
    }
 
+   public static Process spawnVMWithLogMacher(final String wordMatch, final Runnable runnable,
final String testDir, final long timeToRun) throws Exception {
+      return SpawnedVMSupport.spawnVMWithLogMacher(wordMatch, runnable, PageCountSyncServer.class.getName(),
null, true, testDir, "" + timeToRun);
+   }
+
    public void perform(final String folder, final long timeToRun) throws Exception {
 
       try {
@@ -37,6 +41,7 @@ public class PageCountSyncServer extends SpawnedServerSupport {
 
          server.start();
 
+         System.out.println(PageCountSyncOnNonTXTest.WORD_START);
          System.out.println("Server started!!!");
 
          System.out.println("Waiting " + timeToRun + " seconds");


Mime
View raw message