diff options
author | Stephan Herrmann | 2017-03-07 15:59:44 +0000 |
---|---|---|
committer | Stephan Herrmann | 2017-03-07 15:59:44 +0000 |
commit | 9955607f9a874465219115a8891b09a750ca6db8 (patch) | |
tree | 5dccbf15e59f708de5bc429fee500bc3158d0bc7 | |
parent | 685f711cdecfe3506c6b1caeb25579e5a6436f37 (diff) | |
download | org.eclipse.objectteams-9955607f9a874465219115a8891b09a750ca6db8.tar.gz org.eclipse.objectteams-9955607f9a874465219115a8891b09a750ca6db8.tar.xz org.eclipse.objectteams-9955607f9a874465219115a8891b09a750ca6db8.zip |
Bug 513251: [test] First test in StratumTests fails - needs to wait for
autobuild
-rw-r--r-- | testplugins/org.eclipse.objectteams.otdt.debug.tests/src/org/eclipse/objectteams/otdt/debug/tests/OTProjectCreationDecorator.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.debug.tests/src/org/eclipse/objectteams/otdt/debug/tests/OTProjectCreationDecorator.java b/testplugins/org.eclipse.objectteams.otdt.debug.tests/src/org/eclipse/objectteams/otdt/debug/tests/OTProjectCreationDecorator.java index 0c98f3e54..edef02c6d 100644 --- a/testplugins/org.eclipse.objectteams.otdt.debug.tests/src/org/eclipse/objectteams/otdt/debug/tests/OTProjectCreationDecorator.java +++ b/testplugins/org.eclipse.objectteams.otdt.debug.tests/src/org/eclipse/objectteams/otdt/debug/tests/OTProjectCreationDecorator.java @@ -25,7 +25,9 @@ import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
@@ -153,10 +155,27 @@ public class OTProjectCreationDecorator extends AbstractOTDTDebugTest { createLaunchConfiguration("copyinheritancetests.SubTeam");
createLaunchConfiguration("copyinheritancetests.SubTeam2");
createLaunchConfiguration("copyinheritancetests.SubTeam3");
+ waitForJDTInit();
// SH}
}
- /**
+ protected void waitForJDTInit() throws Exception {
+ super.setUp();
+ boolean wasInterrupted = false;
+ do {
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+// Indexer.getInstance().waitForIndex(null);
+ wasInterrupted = false;
+ } catch (OperationCanceledException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ wasInterrupted = true;
+ }
+ } while (wasInterrupted);
+ }
+
+ /**
* Create a project with non-default, mulitple output locations.
*
* @throws Exception
|