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 2025/11/10 14:20:52 UTC
(camel) branch smh created (now 9cfde7d1edb6)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch smh
in repository https://gitbox.apache.org/repos/asf/camel.git
at 9cfde7d1edb6 CAMEL-22679: camel-microprofile-health - Upgrade smallrye health 4.3
This branch includes the following new commits:
new 9cfde7d1edb6 CAMEL-22679: camel-microprofile-health - Upgrade smallrye health 4.3
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-22679: camel-microprofile-health - Upgrade smallrye health 4.3
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch smh
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9cfde7d1edb6f635282a8e9217db0ede9085945b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Nov 10 15:20:35 2025 +0100
CAMEL-22679: camel-microprofile-health - Upgrade smallrye health 4.3
---
.../health/CamelMicroProfileHealthTestSupport.java | 52 ----------------------
parent/pom.xml | 2 +-
2 files changed, 1 insertion(+), 53 deletions(-)
diff --git a/components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java b/components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
index b15012c631cb..2f236edd9c4e 100644
--- a/components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
+++ b/components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthTestSupport.java
@@ -16,23 +16,17 @@
*/
package org.apache.camel.microprofile.health;
-import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.Map;
-import java.util.concurrent.CompletionStage;
import java.util.function.Consumer;
import java.util.stream.Stream;
-import jakarta.enterprise.event.Event;
-import jakarta.enterprise.event.NotificationOptions;
-import jakarta.enterprise.util.TypeLiteral;
import jakarta.json.JsonArray;
import jakarta.json.JsonObject;
import io.smallrye.health.SmallRyeHealth;
import io.smallrye.health.SmallRyeHealthReporter;
import io.smallrye.health.api.HealthType;
-import io.smallrye.health.api.event.HealthStatusChangeEvent;
import io.smallrye.health.registry.HealthRegistries;
import io.smallrye.health.registry.HealthRegistryImpl;
import io.smallrye.mutiny.Uni;
@@ -42,7 +36,6 @@ import org.apache.camel.health.HealthCheckRegistry;
import org.apache.camel.health.HealthCheckResultBuilder;
import org.apache.camel.impl.health.AbstractHealthCheck;
import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.camel.util.ReflectionHelper;
import org.eclipse.microprofile.health.HealthCheckResponse;
public class CamelMicroProfileHealthTestSupport extends CamelTestSupport {
@@ -52,9 +45,6 @@ public class CamelMicroProfileHealthTestSupport extends CamelTestSupport {
@Override
protected void setupResources() throws Exception {
super.setupResources();
-
- // Work around to fulfil CDI injected fields
- setupHealthReporterEventFields();
}
@SuppressWarnings("unchecked")
@@ -84,18 +74,6 @@ public class CamelMicroProfileHealthTestSupport extends CamelTestSupport {
return camelContext;
}
- protected void setupHealthReporterEventFields() {
- Stream.of("healthEvent", "livenessEvent", "readinessEvent", "wellnessEvent", "startupEvent")
- .forEach(fieldName -> {
- try {
- Field field = SmallRyeHealthReporter.class.getDeclaredField(fieldName);
- ReflectionHelper.setField(field, reporter, new NoOpHealthEvent());
- } catch (NoSuchFieldException e) {
- throw new RuntimeException(e);
- }
- });
- }
-
protected void assertHealthCheckOutput(
String expectedName,
HealthCheckResponse.Status expectedState,
@@ -180,34 +158,4 @@ public class CamelMicroProfileHealthTestSupport extends CamelTestSupport {
return readinessCheck;
}
- static final class NoOpHealthEvent implements Event<HealthStatusChangeEvent> {
- @Override
- public void fire(HealthStatusChangeEvent healthStatusChangeEvent) {
- }
-
- @Override
- public <U extends HealthStatusChangeEvent> CompletionStage<U> fireAsync(U u) {
- return null;
- }
-
- @Override
- public <U extends HealthStatusChangeEvent> CompletionStage<U> fireAsync(U u, NotificationOptions notificationOptions) {
- return null;
- }
-
- @Override
- public Event<HealthStatusChangeEvent> select(Annotation... annotations) {
- return null;
- }
-
- @Override
- public <U extends HealthStatusChangeEvent> Event<U> select(Class<U> aClass, Annotation... annotations) {
- return null;
- }
-
- @Override
- public <U extends HealthStatusChangeEvent> Event<U> select(TypeLiteral<U> typeLiteral, Annotation... annotations) {
- return null;
- }
- }
}
diff --git a/parent/pom.xml b/parent/pom.xml
index 10ea9e0136fb..6adb1c47bcbb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -480,7 +480,7 @@
<slf4j-version>2.0.17</slf4j-version>
<smack-version>4.3.5</smack-version>
<smallrye-config-version>3.14.1</smallrye-config-version>
- <smallrye-health-version>4.2.0</smallrye-health-version>
+ <smallrye-health-version>4.3.0</smallrye-health-version>
<smallrye-fault-tolerance-version>6.9.3</smallrye-fault-tolerance-version>
<smbj-version>0.14.0</smbj-version>
<smooks-version>2.2.1</smooks-version>