Randall Hauch created KAFKA-10811:
-------------------------------------

             Summary: System exit from 
MirrorConnectorsIntegrationTest#testReplication
                 Key: KAFKA-10811
                 URL: https://issues.apache.org/jira/browse/KAFKA-10811
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect, mirrormaker
    Affects Versions: 2.5.1, 2.6.0, 2.7.0, 2.8.0
            Reporter: Randall Hauch
            Assignee: Randall Hauch
             Fix For: 2.7.0, 2.5.2, 2.6.1, 2.8.0


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

{noformat}
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
{noformat}

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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to