Skip to content

fix(test): invert results only for not-fixed @Issue tests - #1600

Merged
joaodinissf merged 2 commits into
masterfrom
fix/issue-aware-rule-fixed
Nov 4, 2026
Merged

joaodinissf merged 2 commits into
masterfrom
fix/issue-aware-rule-fixed

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • IssueAwareRule inverts a test's result only when it is annotated @Issue(fixed = false): such a test must fail, and passing is reported as an error. Tests for fixed issues run unchanged. This matches the Issue javadoc, the rule's own javadoc and its JUnit 4 predecessor; the JUnit 5 port had dropped the negation.
  • New IssueAwareRuleTest, registered in XtextTestSuite, covers the rule's results for fixed and not-fixed issues. Four of its five tests fail against the old condition; the fifth, error propagation, passes on both.
  • SwtBotRadioTest.testSWTRadioButtonClick no longer carries the stale @Issue(value = "DSL-371", fixed = false) marker, because the test passes when this bundle's tests are run (test: run each test bundle in its own runtime with JUnit discovery #1599). The test class no longer registers the rule.
  • com.avaloq.tools.ddk.test.core is bumped to 18.0.2 for its changed content against the 19.3.3 baseline.

Overlap

Overlaps with draft #1599 (test discovery) on SwtBotRadioTest and XtextTestSuite, which #1599 deletes; whichever merges second will rebase.

Test plan

  • ./mvnw -T 3C -f ddk-parent/pom.xml clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check --batch-mode --fail-at-end green locally on Temurin 21, including compare-version-with-baselines
  • IssueAwareRuleTest run against the old condition: 4 of 5 tests fail
  • CI

🤖 Generated with Claude Code

rubenporras
rubenporras previously approved these changes Nov 4, 2026
rubenporras
rubenporras previously approved these changes Nov 4, 2026
joaodinissf and others added 2 commits November 4, 2026 14:44
IssueAwareRule expects a test to fail, and reports it as an error when it
passes, only if it is annotated @issue(fixed = false); tests for fixed
issues run unchanged. This matches the Issue javadoc, the rule's own
javadoc and its JUnit 4 predecessor. The JUnit 5 port dropped the negation,
so tests for fixed issues were inverted and not-fixed ones ran normally.
IssueAwareRuleTest covers these results directly.

test.core is bumped to 18.0.2 because its content changed against the
19.3.3 baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SWTBotRadio#click() now selects the radio button correctly, so
testSWTRadioButtonClick passes and runs as a regular test. With the
corrected IssueAwareRule a fixed = false marker would report it as an
unexpected pass. The rule registration is removed with its only user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joaodinissf
joaodinissf force-pushed the fix/issue-aware-rule-fixed branch from c68b0ff to a5bcb88 Compare November 4, 2026 14:00
@joaodinissf
joaodinissf marked this pull request as ready for review November 4, 2026 14:00
@joaodinissf
joaodinissf enabled auto-merge November 4, 2026 14:00
@joaodinissf
joaodinissf added this pull request to the merge queue Nov 4, 2026
Merged via the queue into master with commit 3f6ffcf Nov 4, 2026
4 checks passed
@joaodinissf
joaodinissf deleted the fix/issue-aware-rule-fixed branch November 4, 2026 15:22
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