diff --git a/AGENTS.md b/AGENTS.md index 2790fa217..209c610e4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,7 +91,7 @@ therefore need `-XstartOnFirstThread`. There are two contexts: ### One JUnit run per test module -Every test bundle (packaging `eclipse-test-plugin`) runs its own tests in its own Eclipse runtime. `tycho-surefire-plugin` is configured once in `ddk-parent/pom.xml`; individual test poms carry no test configuration. Surefire finds the tests by class name, so there are no test suites to maintain. Fragment test bundles work the same way, with their host in the runtime. +Every test bundle (packaging `eclipse-test-plugin`) runs its own tests in its own Eclipse runtime. `tycho-surefire-plugin` is configured once in `ddk-parent/pom.xml`; individual test poms only set the properties below if they need a workbench. Surefire finds the tests by class name, so there are no test suites to maintain. Fragment test bundles work the same way, with their host in the runtime. **Consequences for agents:** @@ -99,7 +99,8 @@ Every test bundle (packaging `eclipse-test-plugin`) runs its own tests in its ow - A new test bundle needs packaging `eclipse-test-plugin` and an entry in the `ddk-parent/pom.xml` modules list. With packaging `eclipse-plugin` its tests do not run. - A module's runtime holds only the dependency closure of its manifest. If a test needs a bundle at runtime, for example a language's UI bundle, declare it in that test bundle's `META-INF/MANIFEST.MF`. - Test classes run in alphabetical order within a module and must not depend on running after other classes. -- With `-T`, test runtimes run one at a time (`reactorConcurrencyLevel` in `ddk-parent/pom.xml`), while everything else stays parallel. `CheckQuickfixTest` failed intermittently on macOS when they overlapped. +- Test modules run headless by default, which is Tycho's default: no workbench starts, so `PlatformUI.getWorkbench()` and any Guice injector that needs `IWorkbench` fail. A module that needs a workbench sets `tycho.surefire.useUIHarness` to `true` and `test.reactorConcurrencyLevel` to `1` in its pom's ``. +- With `-T`, headless modules run in parallel while modules with a workbench take turns (`test.reactorConcurrencyLevel`). `CheckQuickfixTest` has failed intermittently on macOS when workbenches overlapped; rerun serially before debugging such a failure. - A failed module's tests leave their log in `/target/work/data/.metadata/.log`. CI archives these logs for failed builds. - To run the tests of one UI bundle from Eclipse, use its launch configuration (e.g. `com.avaloq.tools.ddk.check.ui.test/CheckUiTests.launch`), which runs all tests of the project via JUnit discovery in Eclipse. diff --git a/com.avaloq.tools.ddk.check.core.test/pom.xml b/com.avaloq.tools.ddk.check.core.test/pom.xml index 4e7df161c..f2eb23ebe 100644 --- a/com.avaloq.tools.ddk.check.core.test/pom.xml +++ b/com.avaloq.tools.ddk.check.core.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.check.core.test eclipse-test-plugin + + + true + 1 + \ No newline at end of file diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml b/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml index 2a88da8ae..bcf355715 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.check.test.runtime.tests eclipse-test-plugin + + + true + 1 + \ No newline at end of file diff --git a/com.avaloq.tools.ddk.check.ui.test/pom.xml b/com.avaloq.tools.ddk.check.ui.test/pom.xml index ede57d3fc..1548bfb0e 100644 --- a/com.avaloq.tools.ddk.check.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.check.ui.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.check.ui.test eclipse-test-plugin + + + true + 1 + \ No newline at end of file diff --git a/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml b/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml index cb5a4db00..d87ee6011 100644 --- a/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml +++ b/com.avaloq.tools.ddk.checkcfg.core.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.checkcfg.core.test eclipse-test-plugin + + + true + 1 + \ No newline at end of file diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml b/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml index 67e75318d..42d25e938 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk com.avaloq.tools.ddk.sample.helloworld.ui.test eclipse-test-plugin + + + true + 1 + diff --git a/com.avaloq.tools.ddk.test.ui.test/pom.xml b/com.avaloq.tools.ddk.test.ui.test/pom.xml index 230b40f78..b53feeaa9 100644 --- a/com.avaloq.tools.ddk.test.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.test.ui.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.test.ui.test eclipse-test-plugin + + + true + 1 + diff --git a/com.avaloq.tools.ddk.xtext.ui.test/pom.xml b/com.avaloq.tools.ddk.xtext.ui.test/pom.xml index b38757344..fa1b9e975 100644 --- a/com.avaloq.tools.ddk.xtext.ui.test/pom.xml +++ b/com.avaloq.tools.ddk.xtext.ui.test/pom.xml @@ -10,4 +10,9 @@ com.avaloq.tools.ddk.xtext.ui.test eclipse-test-plugin + + + true + 1 + \ No newline at end of file diff --git a/ddk-parent/pom.xml b/ddk-parent/pom.xml index 94c86cc68..091c49ec6 100644 --- a/ddk-parent/pom.xml +++ b/ddk-parent/pom.xml @@ -41,6 +41,8 @@ ${runtime.javaOptions} 1800 + + 0 [3.9.0,3.10) @@ -273,8 +275,7 @@ junit6 false false - true - 1 + ${test.reactorConcurrencyLevel} ${test.timeout} -Dslf4j.internal.verbosity=ERROR -Dlogback.configurationFile="${runtime.logbackConfig}" ${test.javaOptions} -pluginCustomization ${runtime.pluginCustomization}