Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10811

System exit from MirrorConnectorsIntegrationTest#testReplication

    XMLWordPrintableJSON

Details

    Description

      The MirrorConnectorsIntegrationTest::testReplication has been very frequently causing the build to fail with:

      FAILURE: Build failed with an exception.
      13:50:17  
      13:50:17  * What went wrong:
      13:50:17  Execution failed for task ':connect:mirror:integrationTest'.
      13:50:17  > Process 'Gradle Test Executor 52' finished with non-zero exit value 1
      13:50:17    This problem might be caused by incorrect test process configuration.
      13:50:17    Please refer to the test execution section in the User Manual at https://docs.gradle.org/6.7.1/userguide/java_testing.html#sec:test_execution
      

      Even running this locally resulted in mostly failures, and specifically the `MirrorConnectorsIntegrationTest::testReplication` test method reliably fails due to the process being exited.

      ChrisEgerton traced this to the fact that these integration tests are creating multiple EmbeddedConnectCluster instances, each of which by default:

      • mask the Exit procedures upon startup
      • reset the Exit procedures upon stop

      But since each cluster does this, then Exit.resetExitProcedure() is called when the first Connect cluster is stopped, and if any problems occur while the second Connect cluster is being stopped (e.g., the KafkaBasedLog produce thread is interrupted) then the Exit called by the Connect worker results in the termination of the JVM.

      The solution is to change the MirrorConnectorsIntegrationTest to own the overriding of the exit procedures, and to tell the EmbeddedConnectCluster instances to not mask the exit procedures.

      With these changes, running these tests locally made the tests always pass locally for me.

      Attachments

        Issue Links

          Activity

            People

              rhauch Randall Hauch
              rhauch Randall Hauch
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: