diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java index 17efee6a985..5e401fe5889 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java @@ -105,7 +105,8 @@ protected void setUp() throws Exception { @Override protected void tearDown() throws Exception { // Cleanup workspace first to ensure that auto-build is not started on projects - cleanup(); + waitForBuild(); + getWorkspace().getRoot().delete(true, true, getMonitor()); super.tearDown(); TimerBuilder.abortCurrentBuilds(); } @@ -143,7 +144,7 @@ public void testIndividualProjectBuilds_ProjectRelaxedRule() throws Exception { @Test public void testIndividualProjectBuilds_WithManyProjects_ProjectRelaxedRule() throws Exception { - int numberOfParallelBuilds = 60; + int numberOfParallelBuilds = 30; var longRunningProjects = createMultipleTestProjects(numberOfParallelBuilds, BuildDurationType.LONG_RUNNING, RuleType.CURRENT_PROJECT_RELAXED); executeIndividualFullProjectBuilds(numberOfParallelBuilds, () -> { diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceTest.java index 19ae0dd816f..595a50b5eba 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceTest.java @@ -471,7 +471,8 @@ protected void reinitializeProjectsAfterTestIteration() { public void cleanUp(Object[] args, int countArg) throws Exception { // Reinitialize projects if necessary if (reinitializeOnCleanup) { - IResourceTest.this.cleanup(); + waitForBuild(); + getWorkspace().getRoot().delete(true, true, getMonitor()); IResourceTest.this.initializeProjects(); reinitializeOnCleanup = false; } diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java index 16967bbe0c5..3b2a591c722 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java @@ -428,7 +428,7 @@ public IResource[] buildResources(IContainer root, String[] hierarchy) { return result; } - protected void cleanup() throws CoreException { + private void cleanup() throws CoreException { // Wait for any build job that may still be executed waitForBuild(); final IFileStore[] toDelete = storesToDelete.toArray(new IFileStore[0]);