KAFKA-14133: Migrate various mocks in TaskManagerTest to Mockito#13874
Merged
Conversation
divijvaidya
requested changes
Jun 20, 2023
Contributor
Author
There was a problem hiding this comment.
I removed this because it was never invoked.
Contributor
Author
There was a problem hiding this comment.
The reason for this is that the method in which prepareRecycle is used is the mocked createStandbyTaskFromActive of standbyTaskCreator. Let me know in case I am wrong
Member
There was a problem hiding this comment.
also, verifyNoMoreInteractions since the old easymock verify(producer) was verifying all invocations.
…nd StreamProducer mocks in TaskManagerTest to Mockito
clolov
force-pushed
the
KAFKA-14133-PART11
branch
from
June 26, 2023 08:59
62f188b to
5f4a61e
Compare
divijvaidya
approved these changes
Jul 20, 2023
divijvaidya
left a comment
Member
There was a problem hiding this comment.
Thank you for the changes Christo. Looks good to me.
(I have verified that TaskManagerTest is successful in the CI, rest all failures are unrelated to this change)
jeqo
pushed a commit
to jeqo/kafka
that referenced
this pull request
Jul 21, 2023
…che#13874) Reviewers: Divij Vaidya <diviv@amazon.com>
Cerchie
pushed a commit
to Cerchie/kafka
that referenced
this pull request
Jul 25, 2023
…che#13874) Reviewers: Divij Vaidya <diviv@amazon.com>
jeqo
pushed a commit
to aiven/kafka
that referenced
this pull request
Aug 15, 2023
…che#13874) Reviewers: Divij Vaidya <diviv@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull requests migrates the StreamTask, StandByTask, ProcessorStateManager and StreamProducer mocks in TaskManagerTest from EasyMock to Mockito.
The change is restricted to a single mock to minimize the scope and make it easier for review.
The reasoning as to why we would like to migrate a single mock rather than all mocks in the file at the same time has been discussed in #12607 (comment)
It takes the same approach as in:
#13529
#13621
#13681
#13711