Skip to content

KAFKA-15999: Migrate HeartbeatRequestManagerTest away from ConsumerTestBuilder#16200

Merged
chia7712 merged 84 commits intoapache:trunkfrom
brenden20:15999
Jul 25, 2024
Merged

KAFKA-15999: Migrate HeartbeatRequestManagerTest away from ConsumerTestBuilder#16200
chia7712 merged 84 commits intoapache:trunkfrom
brenden20:15999

Conversation

@brenden20
Copy link
Copy Markdown
Contributor

In this PR I have completely migrated HeartbeatRequestManagerTest away from ConsumerTestBuilder. I have removed any instances of spy objects and used mocks wherever possible. 31/31 tests are passing. I also removed one test that existed in another test file.

@brenden20
Copy link
Copy Markdown
Contributor Author

brenden20 commented Jun 5, 2024

@philipnee @lianetm @kirktrue this is ready for review. Let me know of any suggestions!

@brenden20 brenden20 marked this pull request as ready for review June 6, 2024 20:17
@lianetm
Copy link
Copy Markdown
Member

lianetm commented Jul 18, 2024

Hey @brenden20 , thanks for the updates! Just a few minor comments left.

@brenden20
Copy link
Copy Markdown
Contributor Author

@lianetm thank you for the review! I addressed the comments you left. Let me know if it is good

Copy link
Copy Markdown
Member

@lianetm lianetm left a comment

Choose a reason for hiding this comment

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

Thanks @brenden20, great improvement! LGTM.

@mjsax mjsax changed the title KAFKA-15999 Migrate HeartbeatRequestManagerTest away from ConsumerTestBuilder KAFKA-15999: Migrate HeartbeatRequestManagerTest away from ConsumerTestBuilder Jul 20, 2024
@philipnee philipnee added the KIP-848 The Next Generation of the Consumer Rebalance Protocol label Jul 23, 2024
@lianetm
Copy link
Copy Markdown
Member

lianetm commented Jul 23, 2024

Hey @chia7712, would you maybe have some time to take a look at this? Nice improvement @brenden20 did on the HeartbeatRequestManager test. Thanks!

@chia7712
Copy link
Copy Markdown
Member

I will take a look today!

Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@brenden20 thanks for this great patch. I have only one small comment for you. PTAL

@brenden20
Copy link
Copy Markdown
Contributor Author

@chia7712 thank you for your feedback! I have addressed your comment by moving those object creations into a helper method. Let me know how it looks!

if (testBuilder != null) {
testBuilder.close();
}
private void createHeartbeatStateandRequestManager() {
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.

nit: createHeartbeatStateandRequestManager -> createHeartbeatStateAndRequestManager

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, missed that. Fixed now.

@brenden20
Copy link
Copy Markdown
Contributor Author

@chia7712 fixed that small issue with the name. Let me know if there is anything else!

@chia7712 chia7712 merged commit cca0390 into apache:trunk Jul 25, 2024
@brenden20 brenden20 deleted the 15999 branch July 25, 2024 15:43
abhi-ksolves pushed a commit to ksolves/kafka that referenced this pull request Jul 31, 2024
…tBuilder (apache#16200)

In this PR I have completely migrated HeartbeatRequestManagerTest away from ConsumerTestBuilder. I have removed any instances of spy objects and used mocks wherever possible. 31/31 tests are passing. I also removed one test that existed in another test file.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
chia7712 pushed a commit that referenced this pull request Aug 5, 2024
The purpose of this PR is to remove ConsumerTestBuilder.java since it is no longer needed. The following PRs have eliminated the use of ConsumerTestBuilder:
#14930
#16140
#16200
#16312

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer KIP-848 The Next Generation of the Consumer Rebalance Protocol tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants