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 2021/02/09 18:43:53 UTC
[camel] branch master updated: Upgrade smallrye for the
microprofile components.
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 eb20e0c Upgrade smallrye for the microprofile components.
eb20e0c is described below
commit eb20e0cab58b0fde600477b2ea25f3edfbef9b9f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Feb 9 19:43:05 2021 +0100
Upgrade smallrye for the microprofile components.
---
camel-dependencies/pom.xml | 8 ++++----
.../health/CamelMicroProfileHealthTestSupport.java | 13 +++++++++++++
parent/pom.xml | 8 ++++----
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index f8c0dca..d0048fb 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -510,10 +510,10 @@
<slf4j-api-version>1.7.30</slf4j-api-version>
<slf4j-version>1.7.30</slf4j-version>
<smack-version>4.3.5</smack-version>
- <smallrye-config-version>1.7.0</smallrye-config-version>
- <smallrye-fault-tolerance-version>4.2.0</smallrye-fault-tolerance-version>
- <smallrye-health-version>2.2.1</smallrye-health-version>
- <smallrye-metrics-version>2.4.1</smallrye-metrics-version>
+ <smallrye-config-version>1.10.2</smallrye-config-version>
+ <smallrye-fault-tolerance-version>4.3.2</smallrye-fault-tolerance-version>
+ <smallrye-health-version>2.2.5</smallrye-health-version>
+ <smallrye-metrics-version>2.4.5</smallrye-metrics-version>
<snakeyaml-engine-version>2.1</snakeyaml-engine-version>
<snakeyaml-version>1.27</snakeyaml-version>
<snmp4j-version>2.6.3_1</snmp4j-version>
diff --git a/components/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java b/components/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
index 6e3e41e..3c301a1 100644
--- a/components/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
+++ b/components/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
@@ -26,11 +26,15 @@ import javax.json.Json;
import javax.json.JsonObject;
import javax.json.stream.JsonParser;
+import io.smallrye.health.AsyncHealthCheckFactory;
import io.smallrye.health.SmallRyeHealth;
import io.smallrye.health.SmallRyeHealthReporter;
+import io.smallrye.health.registry.LivenessHealthRegistry;
+import io.smallrye.health.registry.ReadinessHealthRegistry;
import org.apache.camel.health.HealthCheck;
import org.apache.camel.health.HealthCheckResultBuilder;
import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.camel.util.ReflectionHelper;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.junit.jupiter.api.BeforeEach;
@@ -46,6 +50,15 @@ public class CamelMicroProfileHealthTestSupport extends CamelTestSupport {
public void setUp() throws Exception {
super.setUp();
reporter = new SmallRyeHealthReporter();
+
+ // we do not run in CDI so we have to setup this with reflection
+ ReflectionHelper.setField(reporter.getClass().getDeclaredField("asyncHealthCheckFactory"), reporter,
+ new AsyncHealthCheckFactory());
+ ReflectionHelper.setField(reporter.getClass().getDeclaredField("livenessHealthRegistry"), reporter,
+ new LivenessHealthRegistry());
+ ReflectionHelper.setField(reporter.getClass().getDeclaredField("readinessHealthRegistry"), reporter,
+ new ReadinessHealthRegistry());
+ ReflectionHelper.setField(reporter.getClass().getDeclaredField("timeoutSeconds"), reporter, 60);
}
protected void assertHealthCheckOutput(
diff --git a/parent/pom.xml b/parent/pom.xml
index 77a326b..2159dba 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -498,10 +498,10 @@
<slf4j-api-version>1.7.30</slf4j-api-version>
<slf4j-version>1.7.30</slf4j-version>
<smack-version>4.3.5</smack-version>
- <smallrye-config-version>1.7.0</smallrye-config-version>
- <smallrye-metrics-version>2.4.1</smallrye-metrics-version>
- <smallrye-health-version>2.2.1</smallrye-health-version>
- <smallrye-fault-tolerance-version>4.2.0</smallrye-fault-tolerance-version>
+ <smallrye-config-version>1.10.2</smallrye-config-version>
+ <smallrye-metrics-version>2.4.5</smallrye-metrics-version>
+ <smallrye-health-version>2.2.5</smallrye-health-version>
+ <smallrye-fault-tolerance-version>4.3.2</smallrye-fault-tolerance-version>
<snakeyaml-version>1.27</snakeyaml-version>
<snakeyaml-engine-version>2.1</snakeyaml-engine-version>
<snmp4j-version>2.6.3_1</snmp4j-version>