Skip to content

MINOR: Prevent swallowing exceptions in MetricsDuringTopicCreationDeletionTest - #23704

Open
lytt925 wants to merge 1 commit into
apache:trunkfrom
lytt925:minor-metrics-test-stop-swallowing-exceptions
Open

lytt925 wants to merge 1 commit into
apache:trunkfrom
lytt925:minor-metrics-test-stop-swallowing-exceptions

Conversation

@lytt925

@lytt925 lytt925 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

What

createAndDeleteTopics() wrapped createTopic() and deleteTopic() in
catch (Exception ignored). If one of these calls threw, the error was
silently dropped, and the test could pass even though the topics were
never created or deleted, since the metrics it monitors would simply
stay unchanged.

Changes

Let the exceptions propagate so that such failures
fail the test instead.

…onTest

createAndDeleteTopics() wrapped createTopic/deleteTopic in
catch (Exception ignored). If topic creation or deletion failed, the
metrics never changed and the test could pass without exercising
anything. Let the exceptions propagate so such failures fail the test.
@github-actions github-actions Bot added triage PRs from the community tests Test fixes (including flaky tests) clients small Small PRs labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved clients small Small PRs tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants