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

Improving a unit test in GitSCMTest #1073

Merged
merged 3 commits into from
Apr 18, 2021

Conversation

raghavgarg098
Copy link
Contributor

Improving unit test testCommitMessageIsPrintedToLogs

The test case implemented intially was inefficient. It was running the freestyle project and then calling the checkout API again to check for the logged value. Since, running the pipeline job executes the chekout step as well there is no need to invoke checkout step again.Also instead of using mocks we can use waitForMessage API which checks for logged values.

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • Online help has been added and reviewed for any new or modified fields
  • Any dependent changes have been merged and published in upstream modules (like git-client-plugin)

Types of changes

  • Dependency or infrastructure update
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@MarkEWaite MarkEWaite merged commit 7b8457d into jenkinsci:master Apr 18, 2021
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

Successfully merging this pull request may close these issues.

2 participants