Skip to content

MINOR: Propagate ClusterInstance#deleteTopic errors and use it in more tests - #23715

Open
lytt925 wants to merge 2 commits into
apache:trunkfrom
lytt925:followup-clusterinstance-deletetopic
Open

lytt925 wants to merge 2 commits into
apache:trunkfrom
lytt925:followup-clusterinstance-deletetopic

Conversation

@lytt925

@lytt925 lytt925 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #23699 to apply the same changes to ClusterInstance#deleteTopic.

ClusterInstance#deleteTopic did not wait for the DeleteTopics result. If the deletion failed, the error was either ignored (e.g. the topic did not exist) or hidden by the waitTopicDeletion timeout. It now calls get() so that the real error can be propagated. As with createTopic, a RuntimeException cause is rethrown as is, and callers no longer need to handle ExecutionException and InterruptedException.

  • Also do a cleanup to use ClusterInstance#deleteTopic where a test deletes a topic and then
    immediately waits for the deletion.
  • Renamed ClusterTestExtensionsTest#testVerifyTopicDeletion to testDeleteTopic and also verifies that deleting a non-existent topic throws UnknownTopicOrPartitionException.

Reviewers: Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions Bot added tools tests Test fixes (including flaky tests) clients triage PRs from the community labels Oct 5, 2026
@ClusterConfigProperty(key = GROUP_INITIAL_REBALANCE_DELAY_MS_CONFIG, value = "1000"),
@ClusterConfigProperty(key = CONSUMER_GROUP_HEARTBEAT_INTERVAL_MS_CONFIG, value = "500"),
@ClusterConfigProperty(key = CONSUMER_GROUP_MIN_HEARTBEAT_INTERVAL_MS_CONFIG, value = "500"),
@ClusterConfigProperty(key = "log.initial.task.delay.ms", value = "100"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I don’t like to add those specific configurations since they look like something magic. Perhaps this PR can refactor that code as well.

  1. ClusterInstance#deleteTopic should wait for metadata sync only
  2. the logic of waiting disk sync could be moved to DeleteTopicTest. It is the only user
  3. remove all those mysterious configurations from other test cases

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we already have https://issues.apache.org/jira/browse/KAFKA-21153 to handle that. This PR should wait until that is completed.

@github-actions github-actions Bot removed the triage PRs from the community label Oct 13, 2026

@m1a2st m1a2st left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://issues.apache.org/jira/browse/KAFKA-21153 was already completed in 4abb5a2. @lytt925, please resolve the conflict, thanks.

Preserve KAFKA-21153 logical deletion waits alongside deleteTopic error propagation and remove obsolete cleanup delay overrides.

Generated-by: OpenCode (github-copilot/gpt-6.1-sol)
@lytt925

lytt925 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

https://issues.apache.org/jira/browse/KAFKA-21153 was already completed in 4abb5a2. @lytt925, please resolve the conflict, thanks.

Thank you. I've resolved the conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved clients tests Test fixes (including flaky tests) tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants