You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2018/10/03 15:05:13 UTC
[camel] 25/32: Harden tests a bit
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 232d956b4a8200af329919209bb15a455153f6aa
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Oct 1 17:13:10 2018 +0200
Harden tests a bit
---
.../src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java | 2 ++
.../apache/camel/issues/ThreadsRejectedExecutionWithDeadLetterTest.java | 2 ++
2 files changed, 4 insertions(+)
diff --git a/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java b/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
index 4da4ad3..1771563 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
@@ -56,6 +56,7 @@ public class DefaultProducerCacheTest extends ContextTestSupport {
// the eviction is async so force cleanup
cache.cleanUp();
+ Thread.sleep(50);
assertEquals("Size should be 1000", 1000, cache.size());
cache.stop();
@@ -77,6 +78,7 @@ public class DefaultProducerCacheTest extends ContextTestSupport {
// the eviction is async so force cleanup
cache.cleanUp();
+ Thread.sleep(50);
assertEquals("Size should be 5", 5, cache.size());
diff --git a/camel-core/src/test/java/org/apache/camel/issues/ThreadsRejectedExecutionWithDeadLetterTest.java b/camel-core/src/test/java/org/apache/camel/issues/ThreadsRejectedExecutionWithDeadLetterTest.java
index d5f2bda..7a2fc41 100644
--- a/camel-core/src/test/java/org/apache/camel/issues/ThreadsRejectedExecutionWithDeadLetterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/issues/ThreadsRejectedExecutionWithDeadLetterTest.java
@@ -70,6 +70,8 @@ public class ThreadsRejectedExecutionWithDeadLetterTest extends ContextTestSuppo
template.sendBody("seda:start", "Hi World"); // will be queued
template.sendBody("seda:start", "Bye World"); // will be rejected
+ Thread.sleep(100);
+
latch.countDown();
latch.countDown();
latch.countDown();