#2423: isRepositoryUpdateAvailable is not covered by any test that reaches the comparison - #2465
Open
JoelAdbu wants to merge 4 commits into
Conversation
JoelAdbu
marked this pull request as ready for review
September 11, 2026 13:43
Collaborator
Coverage Report for CI Build 34966294534Coverage increased (+0.1%) to 74.267%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions4 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
quando632
reviewed
Sep 14, 2026
quando632
left a comment
Contributor
There was a problem hiding this comment.
Nice catch on the root cause: the old testIsRepositoryUpdateAvailableNoUpdates built two Lists that never reached the mock, so the commit comparison was never executed. The sequential output queue fixes that, and both the no-update and the update path are now genuinely covered. One non-blocking note inline on the "commit id missing" tests.
- added queue to support sequential Git outputs in repository update tests
- added 4 new test for repository update available
- support exit codes and failures in git mock
JoelAdbu
force-pushed
the
feature/2423-isRepositoryUpdateAvailable-is-not-covered-by-any-test-that-reaches-the-comparison
branch
from
September 15, 2026 06:41
2e69fd2 to
ec84184
Compare
quando632
approved these changes
Sep 15, 2026
quando632
left a comment
Contributor
There was a problem hiding this comment.
Nice now everything looks good for me. You only need to update the branch with main, then we can move this to In-Review :)
…not-covered-by-any-test-that-reaches-the-comparison
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #2423
Implemented changes:
ProcessContextGitMockto support sequential Git outputs by adding a per-command FIFO (addCommandOutput), allowing multiple git invocations within a single test flow to return distinct resultstestIsRepositoryUpdateAvailableNoUpdatesto simulate a configured upstream and identical local/remote commit IDs, ensuring the actual commit comparison is reachedtestIsRepositoryUpdateAvailableUpdatesto cover the case where local and remote commit IDs differ and an update is availablenullcommit IDserrors/outs) and updated the Javadocs to accurately reflect the tested behaviorTesting instructions
Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:
GitContextTestGitContextImpl.isRepositoryUpdateAvailable(Path)is covered by the test execution.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.batand notfeature/921 fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalpom.xmlfiles or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc