diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java index a44686121b3..3497056c206 100644 --- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java +++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java @@ -43,6 +43,8 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.QualifiedName; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.rse.core.RSECorePlugin; +import org.eclipse.rse.persistence.IRSEPersistenceManager; import org.eclipse.rse.tests.RSETestsPlugin; import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition; import org.eclipse.rse.ui.SystemBasePlugin; @@ -346,16 +348,66 @@ public class RSECoreTestCase extends TestCase { } } + /** + * Wait until the SystemProfileManager has finished loading all "autoload" profiles, + * and the RSEUIPlugin InitRSEJob has finished filling it with the default connections. + * @throws InterruptedException + */ + protected void waitForRSEWorkspaceInit() throws InterruptedException { + //RSEUIPlugin is loaded automatically because RSETestsPlugins extends SystemBasePlugin, + //which is defined in org.eclipse.rse.ui, so we KNOW org.eclipse.rse.ui is started. + //TODO: At one point we want the tests to run headless, so then RSETestsPlugins should + //not extend SystemBasePlugin any more. + Job[] jobs = Job.getJobManager().find(null); + for(int i=0; i + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +