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
Add Duration overloads. Fixes #1815 #1818
Conversation
Codecov Report
@@ Coverage Diff @@
## release/3.x #1818 +/- ##
=================================================
- Coverage 86.76% 86.71% -0.05%
- Complexity 2490 2492 +2
=================================================
Files 311 311
Lines 6542 6549 +7
Branches 821 821
=================================================
+ Hits 5676 5679 +3
- Misses 670 674 +4
Partials 196 196
Continue to review full report at Codecov.
|
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.
Could we have some additional integration tests that use the new timeout
method? E.g. add some new tests like
mockito/src/test/java/org/mockitousage/verification/VerificationWithTimeoutTest.java
Lines 49 to 58 in 68bc593
@Test | |
public void should_verify_with_timeout() { | |
// when | |
async.runAfter(50, callMock('c')); | |
async.runAfter(500, callMock('c')); | |
// then | |
verify(mock, timeout(200).only()).oneArg('c'); | |
verify(mock).oneArg('c'); //sanity check | |
} |
…ckito#1818)" (mockito#1845) This reverts commit 9603fb2.
…ckito#1818)" (mockito#1845) This reverts commit 9603fb2.
Add new
java.time.Duration
-based public APIs toMockito
,After
, andTimeout
and deprecate the correspondinglong
-based public APIs.Plumb those
Duration
instances through the internals of Mockito.