Skip to content

Commit

Permalink
KAFKA-8995: delete all topics before recreating (apache#8208)
Browse files Browse the repository at this point in the history
I think the root cause of KAFKA-8893, KAFKA-8894, KAFKA-8895 and KSTREAMS-3779 are the same: some intermediate topics are not deleted in the setup logic before recreating the user topics, which could cause the waitForDeletion (that check exact match of all existing topics) to fail, and also could cause more records to be returned because of the intermediate topics that are not deleted from the previous test case.

Also inspired by https://github.com/apache/kafka/pull/5418/files I used a longer timeout (120 secs) for deleting all topics.

Reviewers: John Roesler <[email protected]>
  • Loading branch information
guozhangwang authored Mar 3, 2020
1 parent d3f9cb5 commit 69b670a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ void prepareTest() throws Exception {

waitForEmptyConsumerGroup(adminClient, appID, TIMEOUT_MULTIPLIER * CLEANUP_CONSUMER_TIMEOUT);

cluster.deleteAndRecreateTopics(INPUT_TOPIC, OUTPUT_TOPIC, OUTPUT_TOPIC_2, OUTPUT_TOPIC_2_RERUN);
cluster.deleteAllTopicsAndWait(120000);
cluster.createTopics(INPUT_TOPIC, OUTPUT_TOPIC, OUTPUT_TOPIC_2, OUTPUT_TOPIC_2_RERUN);

add10InputElements();
}
Expand Down

0 comments on commit 69b670a

Please sign in to comment.