Skip to content

KAFKA-21054: Fix vacuous timeout tests in InternalTopicManagerTest - #23417

Open
kuoche1712003 wants to merge 1 commit into
apache:trunkfrom
kuoche1712003:KAFKA-21054-internal-topic-manager-test
Open

kuoche1712003 wants to merge 1 commit into
apache:trunkfrom
kuoche1712003:KAFKA-21054-internal-topic-manager-test

Conversation

@kuoche1712003

Copy link
Copy Markdown
Contributor

The two shouldThrowTimeoutException...HasTopicDescriptionTimeout tests
wrapped the call under test in try/catch without fail(), so they passed
whether or not an exception was thrown. Since KAFKA-14128 the code under
test swallows the TimeoutException from describeTopics and never throws,
so the catch block and its assertion have never executed.

Rename both tests to shouldNotThrowExceptionIf... and replace the
try/catch with assertDoesNotThrow so they fail if the behavior regresses
to throwing. Also collapse the duplicated identical call in the
getNumPartitions test, which was introduced by a rebase conflict
resolution in PR #13161.

Testing: test-only change. Ran InternalTopicManagerTest locally, all passing.
No production code is affected.

@github-actions github-actions Bot added triage PRs from the community streams tests Test fixes (including flaky tests) small Small PRs labels Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved small Small PRs streams 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