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

Removed 1 unnecessary stubbing in GitHubSCMSourceTest.java #732

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

ARUS2023
Copy link
Contributor

Description

A brief summary describing the changes in this pull request.

In our analysis of the project, we observed that the test GitHubSCMSourceTest.testShouldRetrieveNullEvent contains 1 unnecessary stubbing.

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 stubbing.

Submitter checklist

  • Link to JIRA ticket in description, if appropriate.
  • Change is code complete and matches issue description
  • Automated tests have been added to exercise the changes
  • Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • Run the changes and verify that the change matches the issue description
  • Reviewed the code
  • Verified that the appropriate tests have been written or valid explanation given

Documentation changes

  • Link to jenkins.io PR, or an explanation for why no doc changes are needed

Users/aliases to notify

@ARUS2023 ARUS2023 requested a review from a team as a code owner September 26, 2023 03:01
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

🤷 no idea what the test author was asserting here.

@jglick jglick added the test label Sep 26, 2023
@jglick jglick merged commit f62ec0a into jenkinsci:master Sep 26, 2023
spotoczny pushed a commit to smartrecruiters/github-branch-source-plugin that referenced this pull request Oct 13, 2023
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