-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-15999: Migrate HeartbeatRequestManagerTest away from ConsumerTestBuilder #16200
Conversation
Updated testFencedMemberStopHeartbeatUntilItReleasesAssignmentToRejoin() and testSuccessfulHeartbeatTiming() to get them to pass
Removed testHeartbeatMetrics(), only test I was unable to get to pass. Also found that this test already exists in HeartbeatMetricsManagerTest
@philipnee @lianetm @kirktrue this is ready for review. Let me know of any suggestions! |
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Outdated
Show resolved
Hide resolved
Hey @brenden20 , thanks for the updates! Just a few minor comments left. |
@lianetm thank you for the review! I addressed the comments you left. Let me know if it is good |
There was a problem hiding this 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.
Hey @chia7712, would you maybe have some time to take a look at this? Nice improvement @brenden20 did on the HeartbeatRequestManager test. Thanks! |
I will take a look today! |
There was a problem hiding this 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
...s/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java
Outdated
Show resolved
Hide resolved
@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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: createHeartbeatStateandRequestManager
-> createHeartbeatStateAndRequestManager
There was a problem hiding this comment.
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.
@chia7712 fixed that small issue with the name. Let me know if there is anything else! |
…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 <[email protected]>, Chia-Ping Tsai <[email protected]>
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 <[email protected]>
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.