camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [12/18] git commit: Fixed test on slower CI box
Date Mon, 24 Feb 2014 16:04:54 GMT
Fixed test on slower CI box


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3acf9f87
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3acf9f87
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3acf9f87

Branch: refs/heads/camel-2.12.x
Commit: 3acf9f87bb26efd550894671d30e2e569b931083
Parents: 3eb910c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Feb 24 15:26:24 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Feb 24 17:05:41 2014 +0100

----------------------------------------------------------------------
 .../apache/camel/support/DefaultTimeoutMapTest.java  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3acf9f87/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
b/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
index fcf52b8..731c6e7 100644
--- a/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
+++ b/camel-core/src/test/java/org/apache/camel/support/DefaultTimeoutMapTest.java
@@ -23,12 +23,15 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 
 import junit.framework.TestCase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version 
  */
 public class DefaultTimeoutMapTest extends TestCase {
 
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultTimeoutMapTest.class);
     private ScheduledExecutorService executor = new ScheduledThreadPoolExecutor(1);
 
     public void testDefaultTimeoutMap() throws Exception {
@@ -52,6 +55,10 @@ public class DefaultTimeoutMapTest extends TestCase {
         assertEquals(1, map.size());
 
         Thread.sleep(250);
+        if (map.size() > 0) {
+            LOG.warn("Waiting extra due slow CI box");
+            Thread.sleep(1000);
+        }
 
         assertEquals(0, map.size());
 
@@ -124,6 +131,10 @@ public class DefaultTimeoutMapTest extends TestCase {
 
         Thread.sleep(250);
 
+        if (map.size() > 0) {
+            LOG.warn("Waiting extra due slow CI box");
+            Thread.sleep(1000);
+        }
         // should have been timed out now
         assertEquals(0, map.size());
 
@@ -239,6 +250,10 @@ public class DefaultTimeoutMapTest extends TestCase {
 
         // start and wait for scheduler to purge
         Thread.sleep(250);
+        if (map.size() > 0) {
+            LOG.warn("Waiting extra due slow CI box");
+            Thread.sleep(1000);
+        }
         // now it should be gone
         assertEquals(0, map.size());
 


Mime
View raw message