Migrate Kafka ITs to embedded tests #18870
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Kafka ITs come in 2 flavors - serialized and parallelized.
Serialized tests affect the cluster state and thus must not be run concurrently with any other test.
Parallelized tests are pretty much sandboxed since they work on a fresh datasource/supervisor/topic, as applicable.
In the context of embedded-tests, all tests are currently run serially since only 1 cluster can be running at a time to avoid port conflicts. Parallelizing them does not seem necessary at the moment, since the tests are fairly quick.
Changes
KafkaResource.produceRecordsWithoutTransaction()KafkaFaultToleranceTestto replace the following:ITKafkaIndexingServiceTransactionalParallelizedTestITKafkaIndexingServiceNonTransactionalParallelizedTestITKafkaIndexingServiceTransactionalSerializedTestITKafkaIndexingServiceNonTransactionalSerializedTestFaultyClusterTestto replaceITFaultyClusterTest. Getting this test to work required the following changes:TaskLockbox.cleanupPendingSegments()inFaultyTaskLockboxFaultyTaskActionClientFactoryon IndexersKafkaSupervisorReportPayloadKafkaMultiSupervisorTestEmbeddedKafkaSupervisorTestkafka-indexkafka-index-slowkafka-transactional-indexkafka-transactional-index-slowThis PR has: