Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Runtime error using Mockito 4.5.0 #135

Closed
elliott-miller opened this issue Apr 20, 2022 · 1 comment · Fixed by #137
Closed

Runtime error using Mockito 4.5.0 #135

elliott-miller opened this issue Apr 20, 2022 · 1 comment · Fixed by #137
Labels
bug Something isn't working. good first issue Good for newcomers. to grab Ready to do and to grab by those willing.

Comments

@elliott-miller
Copy link

Describe the bug
When using Mockito 4.5.0 you will see the following error (Maven output):

[ERROR] Errors: 
[ERROR]   SettingsStoreTest.closes » UnfinishedMockingSession 
Unfinished mocking session detected.
Previous MockitoSession was not concluded with 'finishMocking()'.
For examples of correct usage see javadoc for MockitoSession class.
[ERROR]   SettingsStoreTest.emptySettings » NoClassDefFound org/mockito/internal/util/reflection/Fields
[ERROR]   SettingsStoreTest.getSettings » UnfinishedMockingSession 

To Reproduce
Set the mockito dependency to 4.5.0 (https://github.com/mockito/mockito/releases/tag/v4.5.0)

Expected behavior
Tests should tun without an error

@slawekjaranowski
Copy link
Member

Thx.
Fields class was removed ... mockito/mockito#2593

PR are welcome.

@slawekjaranowski slawekjaranowski added bug Something isn't working. good first issue Good for newcomers. to grab Ready to do and to grab by those willing. labels Apr 20, 2022
reinhapa added a commit to reinhapa/slf4j-mock that referenced this issue Apr 20, 2022

Unverified

This user has not yet uploaded their public signing key.
Signed-off-by: Patrick Reinhart <patrick.reinhart@bison-group.com>
reinhapa added a commit to reinhapa/slf4j-mock that referenced this issue Apr 20, 2022
Signed-off-by: Patrick Reinhart <patrick@reini.net>
@slawekjaranowski slawekjaranowski linked a pull request Apr 20, 2022 that will close this issue
reinhapa added a commit to reinhapa/slf4j-mock that referenced this issue Apr 20, 2022
Signed-off-by: Patrick Reinhart <patrick@reini.net>
slawekjaranowski pushed a commit that referenced this issue Apr 20, 2022
Signed-off-by: Patrick Reinhart <patrick@reini.net>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working. good first issue Good for newcomers. to grab Ready to do and to grab by those willing.
Development

Successfully merging a pull request may close this issue.

2 participants