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

unnecessary stubbings errors are swallowed when tests run with Mockito #71

Closed
henrypoon opened this issue Sep 12, 2022 · 1 comment
Closed

Comments

@henrypoon
Copy link

The following two issues are found when I have unnecessary stubbing in test with Mockito.

  1. unnecessary stubbings errors are swallowed and test passed when test_filter is being used, however, it failed as expected without test_filter
  2. unnecessary stubbings errors are NOT reported in JUnit reports regardless of using test_filter or not. The JUnit report shows all tests have passed.

Please follow this repo to reproduce the issue locally.

@henrypoon henrypoon changed the title unnecessary stubbings issues are swallowed when tests run with Mockito unnecessary stubbings errors are swallowed when tests run with Mockito Sep 12, 2022
@hvadehra
Copy link
Member

ISTM there isn't anything Bazel related going on here. This is seems more related to mockito/mockito#1924. From a superficial reading of that and all the linked issues, it appears mockito strict stubbing behavior can often be surprising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants