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-13133: Replace EasyMock and PowerMock with Mockito for AbstractHerderTest #12473
Conversation
} | ||
|
||
@Test | ||
public void testConnectorStatus() { |
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.
Reviewers, please note that we have removed this test completely since it is duplicated by another existing test connectorStatus
.
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
@C0urante this is ready for your review when you get some time. Thank you! |
@ijuma @divijvaidya I'm pretty tied up this week and next, but can definitely provide a first review by the end of the week after. Please feel free to ping me if I still haven't left a review by Friday, August 26th. |
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 for the PR! It looks good, I left a few minor suggestions.
@MockStrict private ConfigBackingStore configStore; | ||
@MockStrict private StatusBackingStore statusStore; | ||
@MockStrict private ClassLoader classLoader; | ||
@Mock private Worker worker; |
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.
I think we can also remove the TASK_CONFIGS
constant above
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.
I did not understand the reason for your suggestion. TASK_CONFIGS
is being used to create a ClusterConfigState
containing tasks which are used in testConnectors()
and testReverseTransformConfigs()
tests.
Could you please help me understand the rationale here?
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.
My bad, somehow IDEA marked it as unused but, as you said, it is used!
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.
Thank you for clarifying. In that case, the PR is ready for your review. I have addressed rest of your comments.
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Show resolved
Hide resolved
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
Outdated
Show resolved
Hide resolved
Since this is already receiving attention, I'll redirect my focus to other PRs that haven't gotten anything yet for now. @mimaison Please LMK if you'd like me to lend a hand on this one though :) |
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, LGTM
Tests passed locally, the CI failure |
This PR is created on top of abandoned PR #11137. I have added the previous author's comment in this PR for attribution. I have also addressed the pending comments from @mimaison in this PR.
Notes to help the reviewer:
Testing
./gradlew connect:runtime:unitTest --tests AbstractHerderTest
is successful.