Skip to content

Conversation

@shashankhs11
Copy link
Contributor

@shashankhs11 shashankhs11 commented Oct 26, 2025

  • Removed tests that were tagged for removal
  • Rewrote more tests

Reviewers: Lucas Brutschy [email protected]

@github-actions github-actions bot added triage PRs from the community streams tests Test fixes (including flaky tests) labels Oct 26, 2025
@shashankhs11
Copy link
Contributor Author

@lucasbru tagging for review :)

@lucasbru lucasbru self-assigned this Oct 26, 2025
@lucasbru lucasbru requested a review from Copilot October 26, 2025 12:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR is part 4 of a cleanup and rewrite effort (KAFKA-19683) that removes tagged-for-deletion tests and rewrites existing test cases in the TaskManagerTest file. The changes modernize test structure by replacing legacy StateMachineTask mock implementations with builder-based task creation and Mockito mocks, moving toward a more maintainable and clearer testing approach.

Key Changes:

  • Removed legacy test methods that relied on custom StateMachineTask subclasses with inline behavior overrides
  • Rewrote tests using builder patterns (statefulTask(), standbyTask()) and Mockito verification for cleaner test setup
  • Removed exactly-once-v2 (EOS V2) specific tests that are no longer needed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lucasbru lucasbru self-requested a review October 26, 2025 13:24
Copy link
Member

@lucasbru lucasbru left a comment

Choose a reason for hiding this comment

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

Two high-level qeustions for now


@SuppressWarnings("removal")
@Test
public void shouldCommitAllActiveTasksThatNeedCommittingOnHandleRevocationWithEosV2() {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this without replacement?

Copy link
Contributor Author

@shashankhs11 shashankhs11 Oct 26, 2025

Choose a reason for hiding this comment

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

Honestly, I removed them blindly only since they were marked for removal. Another oversight by me 😓
I'll replace them in another commit.


@SuppressWarnings("removal")
@Test
public void shouldCommitAllActiveTasksThatNeedCommittingOnHandleRevocationWithEosV2() {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this without replacement?


@SuppressWarnings("removal")
@Test
public void shouldCommitViaProducerIfEosV2Enabled() {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this without replacement?


@SuppressWarnings("removal")
@Test
public void shouldCommitAllActiveTasksThatNeedCommittingOnHandleRevocationWithEosV2() {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this without replacement?

@github-actions github-actions bot removed the triage PRs from the community label Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants