You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/10/15 15:17:17 UTC

[camel] branch master updated: Warn if the MockEndpoint's latch did not finish within the specified time (#4456)

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

davsclaus 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 1ed8218  Warn if the MockEndpoint's latch did not finish within the specified time (#4456)
1ed8218 is described below

commit 1ed82181874483c484adf3069b812f9703e99087
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Thu Oct 15 17:16:54 2020 +0200

    Warn if the MockEndpoint's latch did not finish within the specified time (#4456)
---
 .../src/main/java/org/apache/camel/component/mock/MockEndpoint.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index a84a8c9..9ffb2df 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -1729,7 +1729,9 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
 
         // now let's wait for the results
         LOG.debug("Waiting on the latch for: {} millis", timeout);
-        latch.await(waitTime, TimeUnit.MILLISECONDS);
+        if (!latch.await(waitTime, TimeUnit.MILLISECONDS)) {
+            LOG.warn("The latch did not reach 0 within the specified time");
+        }
     }
 
     protected void assertEquals(String message, Object expectedValue, Object actualValue) {