Skip to content

Parameterize bytecode normalization test - #235

Draft
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:agent/sweep-test-bytecode-params
Draft

slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:agent/sweep-test-bytecode-params

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

The four bytecode-mapping assertions were grouped in one test method, so a failure did not say which JDK mapping broke.

  • Replaced the four assertion blocks with a single @ParameterizedTest + @CsvSource({"4, 1.4", "8, 1.8", "9, 9", "17, 17"}) method.
  • All four original mappings are still checked; junit-jupiter-params was already a test dependency.
  • GroovyScriptInterpreterTest surefire count 8 → 11 invocations (one four-assertion test became four parameterized invocations); module total 36 → 39. No case was lost.

Tracking: apache/maven#14072

Verified: JAVA_HOME=<JDK 21> mvn -B -o test → 39 tests, 0 failures/errors, BUILD SUCCESS (0 Checkstyle violations). Mutation: changing the 4, 1.4 row to 4, 1.5 fails with expected: <1.5> but was: <1.4>; the scratch edit was restored and the suite re-run green. CI not checked here (driver checks centrally).

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