This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit a5acddbb0cfa4aa768887b62ce535ac948cc7cda
Author: JiriOndrusek <[email protected]>
AuthorDate: Fri Nov 25 16:07:08 2022 +0100

    Disabled FaultTolerance test because of issues 4298
---
 .../foundation/core-fault-tolerance/pom.xml        |  16 +--
 .../it/CoreFaultToleranceProducers.java            | 116 +++++++++------------
 .../it/CoreFaultToleranceResource.java             |  68 ++++++------
 .../it/CoreFaultToleranceRoutes.java               |   7 +-
 .../faulttolerance/it/CoreFaultToleranceTest.java  |   2 +
 integration-tests/foundation-grouped/pom.xml       |   8 +-
 6 files changed, 99 insertions(+), 118 deletions(-)

diff --git a/integration-test-groups/foundation/core-fault-tolerance/pom.xml 
b/integration-test-groups/foundation/core-fault-tolerance/pom.xml
index 70a65a116b..afebc21f0f 100644
--- a/integration-test-groups/foundation/core-fault-tolerance/pom.xml
+++ b/integration-test-groups/foundation/core-fault-tolerance/pom.xml
@@ -35,10 +35,11 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-direct</artifactId>
         </dependency>
+        <!--https://github.com/apache/camel-quarkus/issues/4298
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId>
-        </dependency>
+        </dependency>-->
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy-jsonb</artifactId>
@@ -88,11 +89,6 @@
         </profile>
         <profile>
             <id>virtualDependencies</id>
-            <activation>
-                <property>
-                    <name>!noVirtualDependencies</name>
-                </property>
-            </activation>
             <dependencies>
                 <!-- The following dependencies guarantee that this module is 
built after them. You can update them by running `mvn process-resources 
-Pformat -N` from the source tree root directory -->
                 <dependency>
@@ -108,6 +104,7 @@
                         </exclusion>
                     </exclusions>
                 </dependency>
+                <!--https://github.com/apache/camel-quarkus/issues/4298
                 <dependency>
                     <groupId>org.apache.camel.quarkus</groupId>
                     
<artifactId>camel-quarkus-microprofile-fault-tolerance-deployment</artifactId>
@@ -120,8 +117,13 @@
                             <artifactId>*</artifactId>
                         </exclusion>
                     </exclusions>
-                </dependency>
+                </dependency>-->
             </dependencies>
+            <activation>
+                <property>
+                    <name>!noVirtualDependencies</name>
+                </property>
+            </activation>
         </profile>
     </profiles>
 
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceProducers.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceProducers.java
index 67f580041d..8a9dc414b3 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceProducers.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceProducers.java
@@ -16,71 +16,57 @@
  */
 package org.apache.camel.quarkus.core.faulttolerance.it;
 
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Disposes;
-import javax.inject.Named;
-
-import io.smallrye.faulttolerance.core.FaultToleranceStrategy;
-import io.smallrye.faulttolerance.core.InvocationContext;
-import io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker;
-import io.smallrye.faulttolerance.core.stopwatch.SystemStopwatch;
-import io.smallrye.faulttolerance.core.timer.ThreadTimer;
-import io.smallrye.faulttolerance.core.util.ExceptionDecision;
-
 public class CoreFaultToleranceProducers {
 
-    @ApplicationScoped
-    @Named("customCircuitBreaker")
-    CircuitBreaker<Integer> produceCustomCircuitBreaker(ThreadTimer 
threadTimer) {
-        FaultToleranceStrategy<Integer> delegate = new 
FaultToleranceStrategy<Integer>() {
-            @Override
-            public Integer apply(InvocationContext<Integer> ctx) {
-                return null;
-            }
-        };
-        return new CircuitBreaker<>(delegate, "description", 
ExceptionDecision.ALWAYS_FAILURE, 10, 40, 0.1,
-                2, SystemStopwatch.INSTANCE, threadTimer) {
-            @Override
-            public String toString() {
-                return "customCircuitBreaker";
-            }
-        };
-    }
-
-    @ApplicationScoped
-    @Named("customBulkheadExecutorService")
-    ExecutorService produceCustomBulkheadExecutorService() {
-        return Executors.newFixedThreadPool(2);
-    }
-
-    @ApplicationScoped
-    @Named("threadTimer")
-    ThreadTimer threadTimer(@Named("threadTimerExecutor") ExecutorService 
executorService) {
-        return new ThreadTimer(executorService);
-    }
-
-    @ApplicationScoped
-    @Named("threadTimerExecutor")
-    ExecutorService threadTimerExecutor() {
-        return Executors.newSingleThreadExecutor();
-    }
-
-    void disposeThreadTimerExecutor(@Disposes @Named("threadTimerExecutor") 
ExecutorService threadTimerExecutor,
-            ThreadTimer timer) {
-        try {
-            timer.shutdown();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }
-
-        try {
-            threadTimerExecutor.awaitTermination(10, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }
-    }
+//    https://github.com/apache/camel-quarkus/issues/4298
+//    @ApplicationScoped
+//    @Named("customCircuitBreaker")
+//    CircuitBreaker<Integer> produceCustomCircuitBreaker(ThreadTimer 
threadTimer) {
+//        FaultToleranceStrategy<Integer> delegate = new 
FaultToleranceStrategy<Integer>() {
+//            @Override
+//            public Integer apply(InvocationContext<Integer> ctx) {
+//                return null;
+//            }
+//        };
+//        return new CircuitBreaker<>(delegate, "description", 
ExceptionDecision.ALWAYS_FAILURE, 10, 40, 0.1,
+//                2, SystemStopwatch.INSTANCE, threadTimer) {
+//            @Override
+//            public String toString() {
+//                return "customCircuitBreaker";
+//            }
+//        };
+//    }
+//
+//    @ApplicationScoped
+//    @Named("customBulkheadExecutorService")
+//    ExecutorService produceCustomBulkheadExecutorService() {
+//        return Executors.newFixedThreadPool(2);
+//    }
+//
+//    @ApplicationScoped
+//    @Named("threadTimer")
+//    ThreadTimer threadTimer(@Named("threadTimerExecutor") ExecutorService 
executorService) {
+//        return new ThreadTimer(executorService);
+//    }
+//
+//    @ApplicationScoped
+//    @Named("threadTimerExecutor")
+//    ExecutorService threadTimerExecutor() {
+//        return Executors.newSingleThreadExecutor();
+//    }
+//
+//    void disposeThreadTimerExecutor(@Disposes @Named("threadTimerExecutor") 
ExecutorService threadTimerExecutor,
+//            ThreadTimer timer) {
+//        try {
+//            timer.shutdown();
+//        } catch (InterruptedException e) {
+//            Thread.currentThread().interrupt();
+//        }
+//
+//        try {
+//            threadTimerExecutor.awaitTermination(10, TimeUnit.SECONDS);
+//        } catch (InterruptedException e) {
+//            Thread.currentThread().interrupt();
+//        }
+//    }
 }
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceResource.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceResource.java
index 24d5fd6bbd..0b67e47552 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceResource.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceResource.java
@@ -16,22 +16,11 @@
  */
 package org.apache.camel.quarkus.core.faulttolerance.it;
 
-import java.util.concurrent.ExecutorService;
-
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
-import javax.inject.Named;
-import javax.json.Json;
-import javax.json.JsonObject;
-import javax.json.JsonObjectBuilder;
-import javax.ws.rs.GET;
 import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
 
-import io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker;
 import org.apache.camel.CamelContext;
-import 
org.apache.camel.component.microprofile.faulttolerance.FaultToleranceProcessor;
 
 @Path("/core")
 @ApplicationScoped
@@ -40,32 +29,33 @@ public class CoreFaultToleranceResource {
     @Inject
     CamelContext context;
 
-    @Named("customCircuitBreaker")
-    CircuitBreaker<Integer> customCircuitBreaker;
-
-    @Named("customBulkheadExecutorService")
-    ExecutorService customBulkheadExecutorService;
-
-    @Path("/fault-tolerance-configurations")
-    @GET
-    @Produces(MediaType.APPLICATION_JSON)
-    public JsonObject faultToleranceConfigurations() {
-        FaultToleranceProcessor ftp = context.getProcessor("ftp", 
FaultToleranceProcessor.class);
-
-        JsonObjectBuilder objectBuilder = Json.createObjectBuilder();
-        objectBuilder.add("isCustomCircuitBreakerRef", ftp.getCircuitBreaker() 
== customCircuitBreaker);
-        objectBuilder.add("delay", ftp.getDelay());
-        objectBuilder.add("successThreshold", ftp.getSuccessThreshold());
-        objectBuilder.add("requestVolumeThreshold", 
ftp.getRequestVolumeThreshold());
-        objectBuilder.add("failureRatio", (int) (ftp.getFailureRate() * 100));
-        objectBuilder.add("timeoutEnabled", ftp.isTimeoutEnabled());
-        objectBuilder.add("timeoutDuration", ftp.getTimeoutDuration());
-        objectBuilder.add("timeoutPoolSize", ftp.getTimeoutPoolSize());
-        objectBuilder.add("bulkheadEnabled", ftp.isBulkheadEnabled());
-        objectBuilder.add("bulkheadMaxConcurrentCalls", 
ftp.getBulkheadMaxConcurrentCalls());
-        objectBuilder.add("bulkheadWaitingTaskQueue", 
ftp.getBulkheadWaitingTaskQueue());
-        objectBuilder.add("isCustomBulkheadExecutorServiceRef", 
ftp.getExecutorService() == customBulkheadExecutorService);
-
-        return objectBuilder.build();
-    }
+    //    https://github.com/apache/camel-quarkus/issues/4298
+    //    @Named("customCircuitBreaker")
+    //    CircuitBreaker<Integer> customCircuitBreaker;
+    //
+    //    @Named("customBulkheadExecutorService")
+    //    ExecutorService customBulkheadExecutorService;
+
+    //    @Path("/fault-tolerance-configurations")
+    //    @GET
+    //    @Produces(MediaType.APPLICATION_JSON)
+    //    public JsonObject faultToleranceConfigurations() {
+    //        FaultToleranceProcessor ftp = context.getProcessor("ftp", 
FaultToleranceProcessor.class);
+    //
+    //        JsonObjectBuilder objectBuilder = Json.createObjectBuilder();
+    //        objectBuilder.add("isCustomCircuitBreakerRef", 
ftp.getCircuitBreaker() == customCircuitBreaker);
+    //        objectBuilder.add("delay", ftp.getDelay());
+    //        objectBuilder.add("successThreshold", ftp.getSuccessThreshold());
+    //        objectBuilder.add("requestVolumeThreshold", 
ftp.getRequestVolumeThreshold());
+    //        objectBuilder.add("failureRatio", (int) (ftp.getFailureRate() * 
100));
+    //        objectBuilder.add("timeoutEnabled", ftp.isTimeoutEnabled());
+    //        objectBuilder.add("timeoutDuration", ftp.getTimeoutDuration());
+    //        objectBuilder.add("timeoutPoolSize", ftp.getTimeoutPoolSize());
+    //        objectBuilder.add("bulkheadEnabled", ftp.isBulkheadEnabled());
+    //        objectBuilder.add("bulkheadMaxConcurrentCalls", 
ftp.getBulkheadMaxConcurrentCalls());
+    //        objectBuilder.add("bulkheadWaitingTaskQueue", 
ftp.getBulkheadWaitingTaskQueue());
+    //        objectBuilder.add("isCustomBulkheadExecutorServiceRef", 
ftp.getExecutorService() == customBulkheadExecutorService);
+    //
+    //        return objectBuilder.build();
+    //    }
 }
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceRoutes.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceRoutes.java
index e820865b8e..3e926e9b9f 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceRoutes.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/main/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceRoutes.java
@@ -32,8 +32,9 @@ public class CoreFaultToleranceRoutes extends RouteBuilder {
 
     @Override
     public void configure() {
-        
from("direct:faultTolerance").circuitBreaker().id("ftp").process(exchange -> {
-            exchange.getMessage().setBody(RESULT);
-        }).onFallback().setBody().constant(FALLBACK_RESULT).end();
+        //        Disabled with the test 
https://github.com/apache/camel-quarkus/issues/4298
+        //        
from("direct:faultTolerance").circuitBreaker().id("ftp").process(exchange -> {
+        //            exchange.getMessage().setBody(RESULT);
+        //        }).onFallback().setBody().constant(FALLBACK_RESULT).end();
     }
 }
diff --git 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
index 6aaa60aaf1..452eee044e 100644
--- 
a/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
+++ 
b/integration-test-groups/foundation/core-fault-tolerance/src/test/java/org/apache/camel/quarkus/core/faulttolerance/it/CoreFaultToleranceTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.quarkus.core.faulttolerance.it;
 
 import io.quarkus.test.junit.QuarkusTest;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import static io.restassured.RestAssured.get;
@@ -26,6 +27,7 @@ import static org.hamcrest.Matchers.is;
 public class CoreFaultToleranceTest {
 
     @Test
+    @Disabled //https://github.com/apache/camel-quarkus/issues/4298
     public void testFaultTolerancePropertiesAreApplied() {
         get("/core/fault-tolerance-configurations")
                 .then()
diff --git a/integration-tests/foundation-grouped/pom.xml 
b/integration-tests/foundation-grouped/pom.xml
index 9bb946c42c..0ec66664e6 100644
--- a/integration-tests/foundation-grouped/pom.xml
+++ b/integration-tests/foundation-grouped/pom.xml
@@ -96,12 +96,11 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-log</artifactId>
         </dependency>
-        <!-- https://github.com/apache/camel-quarkus/issues/4225
+        <!-- https://github.com/apache/camel-quarkus/issues/4298
         <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-mock</artifactId>
@@ -377,6 +376,7 @@
                         </exclusion>
                     </exclusions>
                 </dependency>
+                <!-- https://github.com/apache/camel-quarkus/issues/4298
                 <dependency>
                     <groupId>org.apache.camel.quarkus</groupId>
                     
<artifactId>camel-quarkus-microprofile-fault-tolerance-deployment</artifactId>
@@ -389,7 +389,7 @@
                             <artifactId>*</artifactId>
                         </exclusion>
                     </exclusions>
-                </dependency>
+                </dependency>-->
                 <dependency>
                     <groupId>org.apache.camel.quarkus</groupId>
                     <artifactId>camel-quarkus-mock-deployment</artifactId>

Reply via email to