You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/01/12 09:04:29 UTC
(camel) branch main updated: CAMEL-20297 camel-mock: do not swallow interrupted exceptions
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 987111dc61a CAMEL-20297 camel-mock: do not swallow interrupted exceptions
987111dc61a is described below
commit 987111dc61a06f07807b8e2ac32ba5b971f4232f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Jan 11 10:19:17 2024 +0100
CAMEL-20297 camel-mock: do not swallow interrupted exceptions
---
.../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 51e53977bd2..a3f3dd6d515 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
@@ -1073,7 +1073,8 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
try {
Thread.sleep(50);
} catch (InterruptedException e) {
- // ignore
+ LOG.warn("Interrupted while waiting for the file to exist");
+ Thread.currentThread().interrupt();
}
stop = watch.taken() > timeout;
}
@@ -1427,6 +1428,7 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
try {
return latch.await(0, TimeUnit.SECONDS);
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw RuntimeCamelException.wrapRuntimeException(e);
}
} else {