The MirrorConnectorsIntegrationTest::testReplication has been very frequently causing the build to fail with:
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.