Skip to content

Clean up workspace root markers in ApiBuilderTest.tearDown()#2224

Open
trancexpress wants to merge 1 commit intoeclipse-pde:masterfrom
trancexpress:gh669
Open

Clean up workspace root markers in ApiBuilderTest.tearDown()#2224
trancexpress wants to merge 1 commit intoeclipse-pde:masterfrom
trancexpress:gh669

Conversation

@trancexpress
Copy link
Contributor

@trancexpress trancexpress commented Feb 26, 2026

This change cleans up any workspace root markers during tearDown() of ApiBuilderTest
and then fails the test which produced such markers but didn't clean them up.

See: #669

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Test Results

  147 files  ±0    147 suites  ±0   37m 18s ⏱️ + 1m 49s
3 482 tests ±0  3 428 ✅ ±0   54 💤 ±0  0 ❌ ±0 
9 270 runs  ±0  9 140 ✅ ±0  130 💤 ±0  0 ❌ ±0 

Results for commit 0ba9595. ± Comparison against base commit 12eae51.

♻️ This comment has been updated with latest results.

@trancexpress
Copy link
Contributor Author

trancexpress commented Feb 27, 2026

I'll check how markers of previous tests are handled, that is also a possibility... Maybe a previous test detects the problem and since its on the workspace root it stays.

Running org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest from Eclipse, I don't see the problematic marker getting created. org.eclipse.pde.api.tools.tests.ApiToolsPluginTestSuite I can't run, there are many errors. I tried running the other test suites, I don't see the problem getting created either...

diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
index fc25721d8d..ac4b00e490 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UsageTest.java
@@ -57,7 +57,7 @@ public abstract class UsageTest extends ApiBuilderTest {
        protected void setBuilderOptions() {
                enableUnsupportedTagOptions(false);
                enableUnsupportedAnnotationOptions(false);
-               enableBaselineOptions(false);
+               // enableBaselineOptions(false);
                enableCompatibilityOptions(false);
                enableLeakOptions(false);
                enableSinceTagOptions(false);

I do see a fail then:

junit.framework.ComparisonFailure: Unexpected problem(s)!!!.
----------- Expected ------------

------------ but was ------------
Problem : An API baseline has not been set for the current workspace. [ resource : </fragmenttests> range : <-1,-1> category : <-1> severity : <1>]
Problem : An API baseline has not been set for the current workspace. [ resource : </refproject> range : <-1,-1> category : <-1> severity : <1>]
Problem : An API baseline has not been set for the current workspace. [ resource : </usagetests> range : <-1,-1> category : <-1> severity : <1>]

---------------------- ----------
 expected:<[]> but was:<[Problem : An API baseline has not been set for the current workspace. [ resource : </fragmenttests> range : <-1,-1> category : <-1> severity : <1>]
Problem : An API baseline has not been set for the current workspace. [ resource : </refproject> range : <-1,-1> category : <-1> severity : <1>]
Problem : An API baseline has not been set for the current workspace. [ resource : </usagetests> range : <-1,-1> category : <-1> severity : <1>]
]>
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:265)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assumeEquals(TestCase.java:285)
	at org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest.expectingNoProblemsFor(ApiBuilderTest.java:233)
	at org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest.expectingNoProblemsFor(ApiBuilderTest.java:182)
	at org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest.expectingNoProblems(ApiBuilderTest.java:174)
	at org.eclipse.pde.api.tools.builder.tests.usage.DependentUsageTests.deployTest(DependentUsageTests.java:101)
	at org.eclipse.pde.api.tools.builder.tests.usage.DependentUsageTests.test10(DependentUsageTests.java:411)
	at org.eclipse.pde.api.tools.builder.tests.usage.DependentUsageTests.testAddExtendImplementRestriction(DependentUsageTests.java:389)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at junit.framework.TestCase.runTest(TestCase.java:177)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.runTest(TestCase.java:970)
	at junit.framework.TestCase.runBare(TestCase.java:142)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:130)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:520)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:748)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:443)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:126)
	at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness.lambda$0(PlatformUITestHarness.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Testable.lambda$1(E4Testable.java:127)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5035)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4500)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1051)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:684)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:583)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:185)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:58)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1415)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1387)

But its not the same problem. Its not on the workspace root, its on the projects...

So maybe this is a case of a left-over state (maybe not the marker itself) from another test?

Workspace log from previous build, fails:

https://download.eclipse.org/eclipse/downloads/drops4/I20260225-1800/testresults/ep439I-unit-linux-x86_64-java21_linux.gtk.x86_64_21/org.eclipse.pde.api.tools.tests.ApiToolsPluginTestSuite.txt

Workspace log from latest build, no fails:

https://download.eclipse.org/eclipse/downloads/drops4/I20260226-0420/testresults/ep439I-unit-linux-x86_64-java21_linux.gtk.x86_64_21/org.eclipse.pde.api.tools.tests.ApiToolsPluginTestSuite.txt

@trancexpress trancexpress marked this pull request as draft February 27, 2026 07:42
@trancexpress trancexpress changed the title Log preference changes for missing_default_api_profile during DependentUsageTests Clean up workspace root markers in ApiBuilderTest.tearDown() Feb 27, 2026
@trancexpress trancexpress marked this pull request as ready for review February 27, 2026 08:20
This change cleans up any workspace root markers during tearDown() of ApiBuilderTest
and then fails the test which produced such markers but didn't clean them up.

See: eclipse-pde#669
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