Skip to content

KAFKA-18862: Consolidate shared heartbeat request manager tests#22425

Open
nileshkumar3 wants to merge 1 commit into
apache:trunkfrom
nileshkumar3:KAFKA-18862
Open

KAFKA-18862: Consolidate shared heartbeat request manager tests#22425
nileshkumar3 wants to merge 1 commit into
apache:trunkfrom
nileshkumar3:KAFKA-18862

Conversation

@nileshkumar3
Copy link
Copy Markdown
Contributor

@nileshkumar3 nileshkumar3 commented May 30, 2026

Summary

Duplicate heartbeat poll/timing and error-handling tests in ConsumerHeartbeatRequestManagerTest and ShareHeartbeatRequestManagerTest had drifted out of sync (KAFKA-18862). This consolidates shared behavior into AbstractHeartbeatRequestManagerTest, which both subclasses extend.
Shared tests now live in one place; Consumer and Share only implement createHeartbeatResponse() for their respective RPC types and retain their manager-specific tests.
Moved to the base class:

  • testTimerNotDue
  • testHeartbeatOutsideInterval
  • testNoCoordinator
  • testPollTimerExpirationShouldNotMarkMemberStaleIfMemberAlreadyLeaving
  • testSuccessfulHeartbeatTiming
  • testGroupIdNotFoundExceptionWhileUnsubscribed
  • testGroupIdNotFoundWhileStableIsFatal
  • testHeartbeatResponseOnErrorHandling (with shared errorProvider())
    This also aligns Share error coverage with Consumer (e.g. FENCED_INSTANCE_ID, TOPIC_AUTHORIZATION_FAILED).

Reviewer - @AndrewJSchofield

@github-actions github-actions Bot added the triage PRs from the community label May 30, 2026
@nileshkumar3 nileshkumar3 marked this pull request as draft May 30, 2026 18:10
@github-actions github-actions Bot added consumer tests Test fixes (including flaky tests) clients labels May 30, 2026
@nileshkumar3 nileshkumar3 force-pushed the KAFKA-18862 branch 6 times, most recently from 92e558f to 5e01cff Compare May 30, 2026 22:40
@nileshkumar3 nileshkumar3 marked this pull request as ready for review May 30, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients consumer tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant