Skip to content

test: run check.core.test headless and rename checkcfg.core.test to checkcfg.ui.test - #1640

Open
joaodinissf wants to merge 2 commits into
headless-harness-step-2from
core-tests-headless-step-3
Open

joaodinissf wants to merge 2 commits into
headless-harness-step-2from
core-tests-headless-step-3

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

check.core.test runs without a workbench, and checkcfg.core.test is renamed to checkcfg.ui.test. A core.test module no longer needs the UI harness.

Stacked on #1622: this PR contains only the two commits on top of it.

Why these modules needed a workbench

Most of their tests asked for the language's UI injector. The Check UI injector can't be created without a workbench: check.ui installs SharedUiModule, which binds MarkerResolutionGenerator, and that class injects IWorkbench.

check.core.test

  • Six test classes use the runtime injector, through the existing RegistryIsolatingCheckInjectorProvider: CheckValidationTest, CheckJavaValidatorUtilTest, BasicModelTest, CheckFormattingTest, CheckApiAccessValidationsTest, BugAig830Test. They exercise the runtime module now, not the UI module's overrides.
  • AbstractCheckGenerationTestCase no longer extends AbstractCheckTestCase. Its four test classes generate and compile in memory and never used the workspace project the base class created.
  • AbstractCheckTestCase, ProjectBasedTests and CheckScopingTest move to check.ui.test, package com.avaloq.tools.ddk.check.ui.test. They create a plug-in project in the workspace, which needs the UI injector. Their fixtures stay in check.core.test, where BugDsl27Test and BugAig1314Test share them.
  • The module drops its UI dependencies, its stale generated CheckUiInjectorProvider and its workbench opt-in.
  • check.test.runtime.tests and sample.helloworld.ui.test take AbstractCheckTestCase from check.ui.test.

checkcfg.core.test → checkcfg.ui.test

All 11 tests depend on what only UI bundles register: languages and Check catalogs from the extension registry, a workspace plug-in project, and content assist. The module keeps its workbench opt-in, and its packages are unchanged.

Compatibility

  • AbstractCheckTestCase changes bundle and package. Code outside this repository that extends it needs the new import and a dependency on com.avaloq.tools.ddk.check.ui.test.
  • The bundle com.avaloq.tools.ddk.checkcfg.core.test is now com.avaloq.tools.ddk.checkcfg.ui.test.
  • No bundle that ships in a feature changes.

Validation

  • ./mvnw -U -T 3C clean verify checkstyle:check pmd:pmd pmd:cpd pmd:check pmd:cpd-check spotbugs:check -f ddk-parent/pom.xml --batch-mode --fail-at-end passes locally on this commit (macOS, Temurin 21): 490 tests, 2 skipped.
  • Compared test by test with test: run test modules headless unless they need a workbench #1622's head: the same tests with the same results. 15 tests run in a different module: 11 by the rename and 4 by the move to check.ui.test.
  • check.core.test runs 73 tests under the headless harness. 8 modules run headless and 6 start a workbench.
  • check.ui.test now runs the two moved test classes before CheckQuickfixTest. It passed 10 of 10 serial runs, as did test: run test modules headless unless they need a workbench #1622's head. Before those, testBulkApplyingQuickfix timed out in 2 of 3 runs of this change, one of them under -T 3C; that timeout did not recur.

🤖 Generated with Claude Code

@joaodinissf
joaodinissf marked this pull request as ready for review November 20, 2026 16:50
@joaodinissf
joaodinissf changed the base branch from master to headless-harness-step-2 November 20, 2026 16:52
@joaodinissf
joaodinissf added this pull request to stack #1623 November 20, 2026 16:52
joaodinissf and others added 2 commits November 20, 2026 17:53
The module needed a workbench only because most of its tests asked for
the Check UI injector, which cannot be created without one: check.ui's
SharedUiModule binds MarkerResolutionGenerator, which injects IWorkbench.

- Six test classes use the runtime injector through the existing
  RegistryIsolatingCheckInjectorProvider. They never needed the UI
  module.
- AbstractCheckGenerationTestCase no longer extends
  AbstractCheckTestCase. Its tests generate and compile in memory and
  never used the workspace project that the base class created.
- AbstractCheckTestCase, ProjectBasedTests and CheckScopingTest move to
  check.ui.test, package com.avaloq.tools.ddk.check.ui.test. They create
  a plug-in project in the workspace and need the UI injector. Their
  fixtures stay in check.core.test, where BugDsl27Test and
  BugAig1314Test share them.
- check.core.test drops its UI dependencies, its stale generated
  CheckUiInjectorProvider and its workbench opt-in.
- check.test.runtime.tests and sample.helloworld.ui.test take
  AbstractCheckTestCase from check.ui.test.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
All of its tests depend on what only UI bundles register: the languages
and Check catalogs contributed through the extension registry, a
workspace plug-in project, and content assist. It keeps its workbench
opt-in, and the name now says why.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@joaodinissf
joaodinissf force-pushed the core-tests-headless-step-3 branch from a518789 to c9efb3d Compare November 20, 2026 16:54

This branch has not been deployed

No deployments
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.

1 participant