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

Remove 8 unnecessary stubbings in PiwikTrackerTest.java #138

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

ARUS2023
Copy link
Contributor

In our analysis of the project, we observed that there are 6 tests: PiwikTrackerTest.testSendBulkRequestAsync_Iterable, PiwikTrackerTest.testSendBulkRequestAsync_Iterable_StringFF, PiwikTrackerTest.testSendBulkRequestAsync_Iterable_StringFT, PiwikTrackerTest.testSendBulkRequestAsync_Iterable_StringTT, PiwikTrackerTest.testSendBulkRequest_Iterable_StringTT, PiwikTrackerTest.testSendRequestAsync contain 8 unnecessary stubbings in total.

Unnecessary stubbings are stubbed method calls that were never realized during test execution. Mockito recommends to remove unnecessary stubbings (https://www.javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/exceptions/misusing/UnnecessaryStubbingException.html).

We propose below a solution to remove the unnecessary stubbings.

@dheid dheid self-requested a review October 10, 2023 19:09
@dheid dheid self-assigned this Oct 10, 2023
@dheid dheid added the tests label Oct 10, 2023
@dheid dheid changed the base branch from master to main October 10, 2023 19:11
@dheid dheid merged commit 1276f8c into matomo-org:main Oct 10, 2023
3 checks passed
@dheid
Copy link
Collaborator

dheid commented Oct 10, 2023

Thanks, @ARUS2023 !

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

Successfully merging this pull request may close these issues.

2 participants