This is an automated email from the ASF dual-hosted git repository.

bvahdat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 773e275  polish test
773e275 is described below

commit 773e2752a4ce2d407a756fbd343666bca3729050
Author: Babak Vahdat <[email protected]>
AuthorDate: Sun Oct 27 13:19:57 2019 +0100

    polish test
---
 .../camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
index 6cd93ee..a16d812 100644
--- 
a/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
@@ -43,7 +43,7 @@ public class ConsumerTemplateMaximumCacheSizeTest extends 
SpringRunWithTestSuppo
         assertEquals(50, template.getMaximumCacheSize());
         assertEquals("Size should be 0", 0, template.getCurrentCacheSize());
 
-        // test that we cache at most 50 producers to avoid it eating to much 
memory
+        // test that we cache at most 50 producers to avoid it eating too much 
memory
         for (int i = 0; i < 53; i++) {
             Endpoint e = context.getEndpoint("direct:queue:" + i);
             template.receiveNoWait(e);
@@ -53,7 +53,8 @@ public class ConsumerTemplateMaximumCacheSizeTest extends 
SpringRunWithTestSuppo
         template.cleanUp();
 
         // eviction may still run a bit
-        assertTrue("Size should be around 50", template.getCurrentCacheSize() 
<= 51);
+        int currentCacheSize = template.getCurrentCacheSize();
+        assertTrue("Size should be around 50, but was " + currentCacheSize, 
currentCacheSize <= 51);
         template.stop();
 
         // should be 0

Reply via email to