Skip to content
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

Update mockito to v2.10 #2485

Merged
merged 1 commit into from
Oct 15, 2017
Merged

Update mockito to v2.10 #2485

merged 1 commit into from
Oct 15, 2017

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Oct 12, 2017

requires

What does this PR do?

Update mockito to v2.10
it allows to start to use Java9 as runtime

Release Notes

N/A

Docs PR

N/A

@benoitf
Copy link
Contributor Author

benoitf commented Oct 12, 2017

ci-build

@@ -171,7 +172,7 @@ public void shouldNotBackupWSWithNonRunningStatus() throws Exception {
// add this verification with timeout to ensure that thread executor had enough time before verification of call
verify(backupManager, timeout(2000)).backupWorkspace(WORKSPACE_ID_1);
verify(backupManager, timeout(2000)).backupWorkspace(WORKSPACE_ID_2);
verify(backupManager, timeout(2000).never()).backupWorkspace("ws3");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benoitf Can you elaborate on why did you change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure,

https://static.javadoc.io/org.mockito/mockito-core/1.10.19/org/mockito/verification/VerificationWithTimeout.html
never()
Deprecated.
Validation with timeout combined with never simply does not make sense, as never() will typically immediately pass, and therefore not wait the timeout. The behaviour you may be looking for is actually provided by after().never().
To avoid compilation errors upon upgrade the method is deprecated and it throws a "friendly reminder" exception.
In a future release we will remove timeout(x).atMost(y) and timeout(x).never() from the API.
Do you want to find out more? See issue 235

In 2.x the deprecated stuff has been removed so I switch to after(timeout).never()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tnx for the explanation

@codenvy-ci
Copy link
Contributor

test, hello @benoitf

@riuvshin
Copy link

ci-build

@benoitf
Copy link
Contributor Author

benoitf commented Oct 13, 2017

ci-build

Change-Id: I98c0e6e8a453e7c82c1edcad5f9ea04b2e714eb5
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
@benoitf benoitf force-pushed the update-mockito branch 2 times, most recently from 71c3d80 to d1657a7 Compare October 15, 2017 08:37
@benoitf benoitf merged commit f97d681 into master Oct 15, 2017
@benoitf benoitf deleted the update-mockito branch October 15, 2017 08:38
@benoitf benoitf added this to the 5.20.0 milestone Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants