Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-308

MP Fault Tolerance - unexpected behaviour @Fallback method calls with @Bulkhead

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • MP Fault Tolerance
    • None
    • Hide

      Steps to reproduce:

      • Build WF from PR - https://github.com/wildfly/wildfly/pull/13022
      • Run the test:
        git clone git@github.com:jboss-eap-qe/eap-microprofile-test-suite.git
        cd eap-microprofile-test-suite
        mvn clean verify -Djboss.dist=<path-to-built-wildfly>/wildfly-19.0.0.Beta3-SNAPSHOT -DfailIfNoTests=false -Dtest=FaultTolerance20AsyncTest#bulkheadTimeoutFailure
        
      Show
      Steps to reproduce: Build WF from PR - https://github.com/wildfly/wildfly/pull/13022 Run the test: git clone git@github.com:jboss-eap-qe/eap-microprofile-test-suite.git cd eap-microprofile-test-suite mvn clean verify -Djboss.dist=<path-to-built-wildfly>/wildfly-19.0.0.Beta3-SNAPSHOT -DfailIfNoTests= false -Dtest=FaultTolerance20AsyncTest#bulkheadTimeoutFailure

      MP FT does behave correctly in case when there is @Bulkhead, @Timeout and @Fallback and @Asynchronous on service method. Some of requests do not go to fallback method but end with InterruptedException.

      Test scenario:

      • Deploy MP FT service with:
            @Asynchronous
            @Bulkhead(value = 15, waitingTaskQueue = 15)
            @Timeout(value = 1000)
            @Fallback(fallbackMethod = "processFallback")
            public CompletionStage<MyConnection> bulkheadTimeout(boolean fail) throws InterruptedException {
                if (fail) {
                    Thread.sleep(2000);
                }
                return CompletableFuture.completedFuture(new MyConnection() {
                    @Override
                    public String getData() {
                        return "Hello from @Bulkhead @Timeout method";
                    }
                });
            }
        
            private CompletionStage<MyConnection> processFallback(boolean fail) {
                return CompletableFuture.completedFuture(new MyConnection() {
                    @Override
                    public String getData() {
                        return "Fallback Hello";
                    }
                });
            }
        
      • Send 10+ parallel requests with fail == true

      Expected result:
      All requests should go to fallback.

      Actual Result:
      Random number of requests (close to the number of requests) go to fallback.

            rhn-engineering-rhusar Radoslav Husar
            okotek@redhat.com Ondrej Kotek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: