Bug 513251: [test] First test in StratumTests fails - needs to wait for
autobuild
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 0c98f3e..edef02c 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.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 @@
         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