style: improve test assertions for reduceLog4jAffected#1589
Open
algomaster99 wants to merge 1 commit into
Open
style: improve test assertions for reduceLog4jAffected#1589algomaster99 wants to merge 1 commit into
reduceLog4jAffected#1589algomaster99 wants to merge 1 commit into
Conversation
…plicate versions Replace the weak anyMatch check (which only confirmed the winning log4j-core:2.0 was present) with assertions that verify log4j-core appears exactly once at the resolved version 2.0 and that the conflict-losing log4j-api:2.19.0 duplicate is absent, matching the intent of reduced=true. https://claude.ai/code/session_01Vv1pSzMEituXF8gK6QkSj2
reduceLog4jAffected
Member
Author
|
@brunoapimentel This is not fixing the dependencies. Only making the assertions clearer. |
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.
Summary
Enhanced the
reduceLog4jAffectedintegration test to provide more comprehensive validation of the reduced lockfile behavior, with clearer assertions and improved test documentation.Key Changes
log4j-coreappears exactly once at the resolved version2.0(the conflict winner)log4j-api:2.19.0duplicate is completely absent from the lockfilereduced=trueis configuredfilteredOnandextractingfluent API for the first assertionImplementation Details
The test now explicitly validates that the reduced lockfile correctly:
This change makes the test intent clearer and provides better failure diagnostics if the reduced lockfile behavior regresses.