Skip to content

Parameterize version policy tests - #1539

Merged
slachiewicz merged 1 commit into
apache:masterfrom
slachiewicz:agent/sweep-test-params
Nov 19, 2026
Merged

slachiewicz merged 1 commit into
apache:masterfrom
slachiewicz:agent/sweep-test-params

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Parameterize copy-pasted version-policy tests to remove duplication while keeping every original assertion.

  • DefaultVersionPolicyTest: collapse six release/development tests into two @CsvSource parameterized tests (three cases each).
  • HgScmTranslatorTest: collapse three double-assertion tests into three @CsvSource parameterized tests (two cases each, six assertions preserved).

Tracking: apache/maven#14072
Verified: mvn -B -o test (Java 21) -> BUILD SUCCESS; DefaultVersionPolicyTest 6->6 tests, HgScmTranslatorTest 3->6 invocations with all 6 assertions preserved; mutating one expected value produced an assertion failure and the file was restored.

Replace copy-pasted cases with CsvSource parameterized tests; all original assertions are preserved.
@slachiewicz
slachiewicz marked this pull request as draft November 19, 2026 00:10
@slachiewicz
slachiewicz marked this pull request as ready for review November 19, 2026 09:28
@slachiewicz
slachiewicz merged commit 6bd5b7a into apache:master Nov 19, 2026
15 checks passed
@github-actions github-actions Bot added this to the 3.3.2 milestone Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant