From 93d46abb7a71bb9922cd999590747a8fbb32dfc4 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Mon, 5 Aug 2024 18:06:23 +0200 Subject: [PATCH] Added extra wait time for two randomly failing tests See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2716 --- .../org/eclipse/jdt/core/tests/model/ClasspathTests.java | 7 +++++++ .../org/eclipse/jdt/core/tests/model/JavaProjectTests.java | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java index 95978e6c76d..e38ed1a52c0 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java @@ -5782,6 +5782,13 @@ public void testUnknownElements1() throws CoreException { classpath[1] = src1; project.setRawClasspath(classpath, null); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + waitForManualRefresh(); + // check that .classpath has correct content String contents = new String (org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(getFile("/P/.classpath"))); assertSourceEquals( diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java index c55f03736f6..b4f12d4311e 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java @@ -2486,8 +2486,12 @@ public void run(IProgressMonitor monitor) throws CoreException { } }, null); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } waitForManualRefresh(); - waitForAutoBuild(); IPackageFragmentRoot root = getPackageFragmentRoot("P", ""); assertElementsEqual( "Unexpected children size in 'P' default source folder",