Chris Egerton created KAFKA-10070: ------------------------------------- Summary: Parameterize Connect unit tests to remove code duplication Key: KAFKA-10070 URL: https://issues.apache.org/jira/browse/KAFKA-10070 Project: Kafka Issue Type: Task Components: KafkaConnect Affects Versions: 2.6.0 Reporter: Chris Egerton Assignee: Konstantine Karantasis
[https://github.com/apache/kafka/pull/8722] added two new unit tests, {{WorkerWithTopicCreationTest}} and {{WorkerSourceTaskWithTopicCreationTest}} that are almost entirely clones of the existing {{WorkerTest}} and {{WorkerSourceTaskTest}} unit tests. There's a couple of comments ([1|https://github.com/apache/kafka/blob/fe948d39e54cf2d57e9b9e0e2a203890dc8ce86d/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerWithTopicCreationTest.java#L149], [2|https://github.com/apache/kafka/blob/fe948d39e54cf2d57e9b9e0e2a203890dc8ce86d/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSourceTaskWithTopicCreationTest.java#L162]) in them about plans to parameterize the tests; we should do this sooner rather than later to avoid expending developer time on copy+pasting code changes across two tests when making modifications to the {{Worker}} and/or {{WorkerSourceTask}} classes. -- This message was sent by Atlassian Jira (v8.3.4#803005)