-
Notifications
You must be signed in to change notification settings - Fork 424
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
TEZ-4383: upgrade to mockito 4.3.1 #190
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
deserialized.readFields(new DataInputStream(new ByteArrayInputStream(bos.toByteArray()))); | ||
verifyResults(entityDescriptor, deserialized, payload, confVal); | ||
} | ||
|
||
@Test (timeout=1000) | ||
@Test (timeout=3000) |
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.
is this change needed?
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'm not sure. Initially this test timed out with the original timeout value. I double check this one.
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
import static org.mockito.ArgumentMatchers.any; | ||
import static org.mockito.Mockito.*; |
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.
please remove wildcard import, we usually refrain from doing that
by removing it we can stay consistent with other parts of the code
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.
Cool, OK, consistency is also important for me.
But the tests don't always do that, namely the any()
and the other matchers can be imported both as org.mockito.Mockito.any
and as org.mockito.ArgumentMatchers.any
. I would keep only one of these. The org.mockito.Mockito.any
seems to be the better choice.
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.
this looks confusing from mockito side, can you please clarify the difference between them?
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.
These are the same. Basically the same code (function) is added to both the ArgumentMatchers and the Mockito classes. So in theory there is no real difference.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
💔 -1 overall
This message was automatically generated. |
mvn install failures are not related, patch LGTM, let's merge the change and then we can see if the issue persists |
No description provided.