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 test dependencies #3090

Merged

Conversation

FlorianHockmann
Copy link
Member

@FlorianHockmann FlorianHockmann commented Jun 22, 2022

This updates JUnit, TestContainers, Lombok, and Mockito together as it wasn't possible to only update TestContainers alone since it also depends on JUnit, see PR #2972.
The same applies to Mockito.

These changes were necessary to update Mockito to v4:

Import of org.mockito.Matchers needed to be changed to org.mockito.ArgumentMatchers. Matchers was already only an alias for ArgumentMatchers before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

any() is the replacement for anyObject():
mockito/mockito#1931

Calling property() on a mocked StandardVertex resulted in a NullPointer exception, but we can also simply use a DetachedProperty as all accesses to that property on the vertex are also already mocked.


Thank you for contributing to JanusGraph!

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there an issue associated with this PR? Is it referenced in the commit message?
  • Does your PR body contain #xyz where xyz is the issue number you are trying to resolve?
  • Has your PR been rebased against the latest commit within the target branch (typically master)?
  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you written and/or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE.txt file, including the main LICENSE.txt file in the root of this repository?
  • If applicable, have you updated the NOTICE.txt file, including the main NOTICE.txt file found in the root of this repository?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

This updates JUnit, TestContainers, Lombok, and Mockito together as it
wasn't possible to only update TestContainers alone since it also
depends on JUnit, see PR JanusGraph#2972.
The same applies to Mockito.

These changes were necessary to update Mockito to v4:

Import of `org.mockito.Matchers` needed to be changed to
`org.mockito.ArgumentMatchers`. `Matchers` was already only an alias
for `ArgumentMatchers` before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

`any()` is the replacement for `anyObject()`:
mockito/mockito#1931

Calling `property()` on a mocked `StandardVertex` resulted in a
`NullPointer` exception, but we can also simply use a `DetachedProperty`
as all accesses to that property on the vertex are also already mocked.

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
@FlorianHockmann FlorianHockmann merged commit b44aa6f into JanusGraph:master Jun 30, 2022
@FlorianHockmann FlorianHockmann deleted the update-test-dependencies branch June 30, 2022 07:43
@FlorianHockmann FlorianHockmann added this to the Release v1.0.0 milestone Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: external Externally-managed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants