You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2021/06/22 16:32:47 UTC
[camel-quarkus] 02/05: ThreadPoolBulkhead not available in
smallrye-fault-tolerance 5.1.0
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit d3dd1114dbb0a89745b43fa4515f58daf3340b1d
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jun 22 13:08:02 2021 +0100
ThreadPoolBulkhead not available in smallrye-fault-tolerance 5.1.0
Fixes #2696
---
integration-tests/microprofile/pom.xml | 3 +--
.../MicroProfileFaultToleranceRoutes.java | 22 +++++++++++-----------
.../MicroprofileFaultToleranceIT.java | 2 --
.../MicroprofileFaultToleranceTest.java | 2 --
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/integration-tests/microprofile/pom.xml b/integration-tests/microprofile/pom.xml
index a31cb6f..9a23d5e 100644
--- a/integration-tests/microprofile/pom.xml
+++ b/integration-tests/microprofile/pom.xml
@@ -30,11 +30,10 @@
<description>Integration tests for Camel Quarkus MicroProfile extensions</description>
<dependencies>
- <!-- https://github.com/apache/camel-quarkus/issues/2696
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId>
- </dependency> -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-health</artifactId>
diff --git a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java
index 6079148..271daab 100644
--- a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java
+++ b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java
@@ -28,16 +28,16 @@ public class MicroProfileFaultToleranceRoutes extends RouteBuilder {
@Override
public void configure() throws Exception {
- // from("direct:faultTolerance")
- // .circuitBreaker()
- // .process(exchange -> {
- // if (COUNTER.incrementAndGet() == 1) {
- // throw new IllegalStateException("Simulated Exception");
- // }
- // exchange.getMessage().setBody(RESULT);
- // })
- // .onFallback()
- // .setBody().constant(FALLBACK_RESULT)
- // .end();
+ from("direct:faultTolerance")
+ .circuitBreaker()
+ .process(exchange -> {
+ if (COUNTER.incrementAndGet() == 1) {
+ throw new IllegalStateException("Simulated Exception");
+ }
+ exchange.getMessage().setBody(RESULT);
+ })
+ .onFallback()
+ .setBody().constant(FALLBACK_RESULT)
+ .end();
}
}
diff --git a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java
index 155e8e7..90bdf9f 100644
--- a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java
+++ b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java
@@ -17,9 +17,7 @@
package org.apache.camel.quarkus.component.microprofile.it.faulttolerance;
import io.quarkus.test.junit.NativeImageTest;
-import org.junit.jupiter.api.Disabled;
-@Disabled("https://github.com/apache/camel-quarkus/issues/2696")
@NativeImageTest
class MicroprofileFaultToleranceIT extends MicroprofileFaultToleranceTest {
diff --git a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java
index 4818bd2..d5bd0c5 100644
--- a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java
+++ b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java
@@ -19,10 +19,8 @@ package org.apache.camel.quarkus.component.microprofile.it.faulttolerance;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import org.hamcrest.Matchers;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-@Disabled("https://github.com/apache/camel-quarkus/issues/2696")
@QuarkusTest
class MicroprofileFaultToleranceTest {