camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1296791 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/builder/xml/ camel-core/src/test/java/org/apache/camel/component/file/ camel-core/src/test/java/org/apache/camel/component/seda/ camel-core/src/test/java/org/apache/camel...
Date Sun, 04 Mar 2012 12:51:12 GMT
Author: cmueller
Date: Sun Mar  4 12:51:11 2012
New Revision: 1296791

URL: http://svn.apache.org/viewvc?rev=1296791&view=rev
Log:
Revert "Improved the unit tests to check that countDownLatch.await(timeout, timeUnit) returns
true which means it was NOT triggered by the timeout"

This reverts commit fa9f6422e95638148d32cdee9c5ab2b6f2d18342.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/GertJBIIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java
    camel/trunk/components/camel-bam/src/test/java/org/apache/camel/bam/MultipleActivitiesConcurrentlyTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerThrowExceptionOnLoginFailedTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyManualReplyTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsConcurrentConsumersTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/AbstractJpaMethodTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
    camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutTest.java
    camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TcpWithInOutTest.java
    camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java Sun Mar
 4 12:51:11 2012
@@ -361,7 +361,7 @@ public class XPathTest extends ContextTe
         }
 
         // give time to convert concurrently
-        assertTrue(latch.await(20, TimeUnit.SECONDS));
+        latch.await(20, TimeUnit.SECONDS);
 
         assertEquals(size, result.size());
         Iterator<Document> it = result.iterator();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
Sun Mar  4 12:51:11 2012
@@ -64,7 +64,7 @@ public class FileConsumerPollStrategyPol
         assertMockEndpointsSatisfied();
 
         // wait for commit to be issued
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        latch.await(5, TimeUnit.SECONDS);
 
         assertEquals(2, maxPolls);
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRouteTest.java
Sun Mar  4 12:51:11 2012
@@ -62,7 +62,8 @@ public class SedaRouteTest extends TestS
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
 
         context.stop();
     }
@@ -96,7 +97,8 @@ public class SedaRouteTest extends TestS
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
 
         context.stop();
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java
Sun Mar  4 12:51:11 2012
@@ -41,7 +41,7 @@ public class SedaWaitForTaskNewerOnCompl
 
         assertMockEndpointsSatisfied();
 
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        latch.await(5, TimeUnit.SECONDS);
         // B should be first because we do not wait
         assertEquals("BCA", done);
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
Sun Mar  4 12:51:11 2012
@@ -267,7 +267,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertMockEndpointsSatisfied();
@@ -293,7 +293,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());
@@ -365,7 +365,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertMockEndpointsSatisfied();
@@ -387,7 +387,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());
@@ -456,7 +456,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertMockEndpointsSatisfied();
@@ -483,7 +483,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());
@@ -509,7 +509,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());
@@ -533,7 +533,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());
@@ -558,7 +558,7 @@ public class DefaultProducerTemplateAsyn
         });
 
         ORDER.addAndGet(1);
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         ORDER.addAndGet(4);
 
         assertEquals(7, ORDER.get());

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java
Sun Mar  4 12:51:11 2012
@@ -44,7 +44,7 @@ public class PendingExchangesShutdownGra
         assertMockEndpointsSatisfied();
 
         // now stop the route before its complete
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         context.stop();
 
         // it should wait as there was 1 inflight exchange and 4 pending messages left

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java
Sun Mar  4 12:51:11 2012
@@ -51,7 +51,7 @@ public class PendingExchangesTwoRouteShu
 
         assertMockEndpointsSatisfied();
 
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
         context.stop();
 
         // it should wait as there were 2 inflight exchanges and 8 pending messages left

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/GertJBIIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/GertJBIIssueTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/GertJBIIssueTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/GertJBIIssueTest.java Sun
Mar  4 12:51:11 2012
@@ -90,7 +90,7 @@ public class GertJBIIssueTest extends Co
             }
         });
 
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
 
         assertNotNull("Should have failed", cause);
         assertIsInstanceOf(IllegalArgumentException.class, cause);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java
Sun Mar  4 12:51:11 2012
@@ -54,7 +54,7 @@ public class StopCamelFromRouteTest exte
         template.sendBody("direct:start", "Hello Camel");
 
         // wait for the latch (use 1 minute as fail safe, due unit test)
-        assertTrue(latch.await(1, TimeUnit.MINUTES));
+        latch.await(1, TimeUnit.MINUTES);
 
         // stop camel
         context.stop();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/CaseInsensitiveMapTest.java
Sun Mar  4 12:51:11 2012
@@ -466,7 +466,7 @@ public class CaseInsensitiveMapTest exte
             });
         }
 
-        assertTrue(latch.await(10, TimeUnit.SECONDS));
+        latch.await(10, TimeUnit.SECONDS);
 
         assertEquals(1003, map.size());
         assertEquals(true, map.containsKey("counter0"));

Modified: camel/trunk/components/camel-bam/src/test/java/org/apache/camel/bam/MultipleActivitiesConcurrentlyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bam/src/test/java/org/apache/camel/bam/MultipleActivitiesConcurrentlyTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-bam/src/test/java/org/apache/camel/bam/MultipleActivitiesConcurrentlyTest.java
(original)
+++ camel/trunk/components/camel-bam/src/test/java/org/apache/camel/bam/MultipleActivitiesConcurrentlyTest.java
Sun Mar  4 12:51:11 2012
@@ -48,12 +48,12 @@ public class MultipleActivitiesConcurren
         thread.start();
 
         // use a timeout to avoid test hang if something happens
-        assertTrue(startLatch.await(30, TimeUnit.SECONDS));
+        startLatch.await(30, TimeUnit.SECONDS);
 
         sendAMessages();
 
         // use a timeout to avoid test hang if something happens
-        assertTrue(endLatch.await(30, TimeUnit.SECONDS));
+        endLatch.await(30, TimeUnit.SECONDS);
 
         overdueEndpoint.assertIsSatisfied();
     }

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerThrowExceptionOnLoginFailedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerThrowExceptionOnLoginFailedTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerThrowExceptionOnLoginFailedTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerThrowExceptionOnLoginFailedTest.java
Sun Mar  4 12:51:11 2012
@@ -51,7 +51,7 @@ public class FtpConsumerThrowExceptionOn
     public void testBadLogin() throws Exception {
         getMockEndpoint("mock:result").expectedMessageCount(0);
 
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        latch.await(5, TimeUnit.SECONDS);
 
         assertMockEndpointsSatisfied();
 

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyManualReplyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyManualReplyTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyManualReplyTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyManualReplyTest.java
Sun Mar  4 12:51:11 2012
@@ -75,7 +75,7 @@ public class JmsRequestReplyManualReplyT
             }
         });
 
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        latch.await(5, TimeUnit.SECONDS);
         String reply = consumer.receiveBody(tempName, 5000, String.class);
         assertEquals("Bye World", reply);
     }

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsConcurrentConsumersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsConcurrentConsumersTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsConcurrentConsumersTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsConcurrentConsumersTest.java
Sun Mar  4 12:51:11 2012
@@ -60,7 +60,7 @@ public class JmsConcurrentConsumersTest 
         long start = System.currentTimeMillis();
 
         // wait for test completion, timeout after 30 sec to let other unit test run to not
wait forever
-        assertTrue(latch.await(30000L, TimeUnit.MILLISECONDS));
+        latch.await(30000L, TimeUnit.MILLISECONDS);
         assertEquals("Latch should be zero", 0, latch.getCount());
 
         long delta = System.currentTimeMillis() - start;

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/AbstractJpaMethodTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/AbstractJpaMethodTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/AbstractJpaMethodTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/AbstractJpaMethodTest.java
Sun Mar  4 12:51:11 2012
@@ -140,8 +140,9 @@ public abstract class AbstractJpaMethodT
         });
         consumer.start();
         
-        assertTrue(latch.await(50, TimeUnit.SECONDS));
+        boolean received = latch.await(50, TimeUnit.SECONDS);
         
+        assertTrue(received);
         assertNotNull(receivedExchange);
         Customer receivedCustomer = receivedExchange.getIn().getBody(Customer.class);
         assertEquals(customer.getName(), receivedCustomer.getName());

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
Sun Mar  4 12:51:11 2012
@@ -97,7 +97,8 @@ public class JpaTest extends Assert {
         });
         consumer.start();
 
-        assertTrue(latch.await(50, TimeUnit.SECONDS));
+        boolean received = latch.await(50, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
 
         assertNotNull(receivedExchange);
         SendEmail result = receivedExchange.getIn().getBody(SendEmail.class);

Modified: camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
(original)
+++ camel/trunk/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
Sun Mar  4 12:51:11 2012
@@ -100,7 +100,8 @@ public class JpaWithNamedQueryTest exten
         });
         consumer.start();
 
-        assertTrue(latch.await(50, TimeUnit.SECONDS));
+        boolean received = latch.await(50, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
 
         assertReceivedResult(receivedExchange);
 

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutTest.java
(original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutTest.java
Sun Mar  4 12:51:11 2012
@@ -70,7 +70,8 @@ public class MinaTcpWithInOutTest extend
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
         assertNotNull(receivedExchange.getIn());
         assertEquals("!olleH", receivedExchange.getIn().getBody());
 
@@ -113,7 +114,8 @@ public class MinaTcpWithInOutTest extend
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
         assertNotNull(receivedExchange.getIn());
         assertEquals("!olleH", receivedExchange.getIn().getBody());
 

Modified: camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TcpWithInOutTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TcpWithInOutTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TcpWithInOutTest.java
(original)
+++ camel/trunk/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TcpWithInOutTest.java
Sun Mar  4 12:51:11 2012
@@ -72,7 +72,8 @@ public class Mina2TcpWithInOutTest exten
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
         assertNotNull(receivedExchange.getIn());
         assertEquals("!olleH", receivedExchange.getIn().getBody());
 
@@ -117,7 +118,8 @@ public class Mina2TcpWithInOutTest exten
         producer.process(exchange);
 
         // now lets sleep for a while
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
         assertNotNull(receivedExchange.getIn());
         assertEquals("!olleH", receivedExchange.getIn().getBody());
 

Modified: camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
(original)
+++ camel/trunk/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
Sun Mar  4 12:51:11 2012
@@ -90,7 +90,8 @@ public class XmppRouteTest extends TestC
 
     protected Object assertReceivedValidExchange() throws Exception {
         // lets wait on the message being received
-        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        boolean received = latch.await(5, TimeUnit.SECONDS);
+        assertTrue("Did not receive the message!", received);
 
         assertNotNull(receivedExchange);
         XmppMessage receivedMessage = (XmppMessage)receivedExchange.getIn();

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java?rev=1296791&r1=1296790&r2=1296791&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/jms/JmsPerformanceTest.java
Sun Mar  4 12:51:11 2012
@@ -87,7 +87,7 @@ public class JmsPerformanceTest extends 
     }
 
     protected void assertExpectedMessagesReceived() throws InterruptedException {
-        assertTrue(receivedCountDown.await(50, TimeUnit.SECONDS));
+        receivedCountDown.await(50, TimeUnit.SECONDS);
 
         assertEquals("Received message count", expectedMessageCount, consumedMessageCount);
 



Mime
View raw message