This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 2c7237c712 Fix SSL exception detection in splunk-hec test
2c7237c712 is described below
commit 2c7237c71289da22b9d1bde383dee9ca32decfc7
Author: Lukas Lowinger <[email protected]>
AuthorDate: Sat Oct 24 08:55:26 2026 +0200
Fix SSL exception detection in splunk-hec test
---
.../quarkus/component/splunk/hec/it/SplunkHecResource.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git
a/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java
b/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java
index e8702014a8..560bbbe246 100644
---
a/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java
+++
b/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java
@@ -78,13 +78,24 @@ public class SplunkHecResource {
.entity(producer.requestBodyAndHeader(url, data,
SplunkHECConstants.INDEX_TIME, indexTime, String.class))
.build();
} catch (Exception e) {
- if (e.getCause() instanceof SSLException) {
+ if (containsSslException(e)) {
return Response.status(500).entity("ssl exception").build();
}
throw new RuntimeException(e);
}
}
+ private boolean containsSslException(Throwable e) {
+ Throwable current = e;
+ while (current != null) {
+ if (current instanceof SSLException) {
+ return true;
+ }
+ current = current.getCause();
+ }
+ return false;
+ }
+
@Named("sslContextParameters")
public SSLContextParameters createServerSSLContextParameters() {
return
createServerSSLContextParameters("target/certs/splunk-hec-keystore.p12");