Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B2E41064C for ; Mon, 24 Feb 2014 16:05:17 +0000 (UTC) Received: (qmail 18745 invoked by uid 500); 24 Feb 2014 16:05:08 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 18282 invoked by uid 500); 24 Feb 2014 16:04:55 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 17625 invoked by uid 99); 24 Feb 2014 16:04:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 16:04:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 19F1390333F; Mon, 24 Feb 2014 16:04:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 24 Feb 2014 16:04:54 -0000 Message-Id: <29cc3e384d33401782be316c52c39b14@git.apache.org> In-Reply-To: <9b19143ec9484f6cb3b0324410e8ee7d@git.apache.org> References: <9b19143ec9484f6cb3b0324410e8ee7d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/18] git commit: Fixed test on slower CI box 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 Authored: Mon Feb 24 15:26:24 2014 +0100 Committer: Claus Ibsen 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());