Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAnton Leherbauer2007-02-13 16:12:03 +0000
committerAnton Leherbauer2007-02-13 16:12:03 +0000
commitf4f9b8af690763098f0a72007705cdae4b1a9d41 (patch)
tree0e3ca949af6c5c090eeabc09f89612716e6915d3 /core
parent312ea7796b2ec086f1e37190b6186b8517f3c62d (diff)
downloadorg.eclipse.cdt-f4f9b8af690763098f0a72007705cdae4b1a9d41.tar.gz
org.eclipse.cdt-f4f9b8af690763098f0a72007705cdae4b1a9d41.tar.xz
org.eclipse.cdt-f4f9b8af690763098f0a72007705cdae4b1a9d41.zip
Limit the max wait time for joining background jobs
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java
index 7f5e8e86615..cef9059faa5 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java
@@ -112,6 +112,8 @@ public class EditorTestHelper {
public static final String NAVIGATOR_VIEW_ID= "org.eclipse.ui.views.ResourceNavigator";
public static final String INTRO_VIEW_ID= "org.eclipse.ui.internal.introview";
+
+ private static final long MAX_WAIT_TIME = 60000; // don't wait longer than 60 seconds
public static IEditorPart openInEditor(IFile file, boolean runEventLoop) throws PartInitException {
IEditorPart part= IDE.openEditor(getActivePage(), file);
@@ -272,7 +274,7 @@ public class EditorTestHelper {
IIndexManager indexManager= CCorePlugin.getIndexManager();
indexManager.joinIndexer(1000, new NullProgressMonitor());
// Join jobs
- joinJobs(0, 0, 500);
+ joinJobs(0, 1000, 500);
Logger.global.exiting("EditorTestHelper", "joinBackgroundActivities");
}
@@ -285,7 +287,7 @@ public class EditorTestHelper {
return allJobsQuiet();
}
};
- boolean quiet= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : Long.MAX_VALUE, intervalTime);
+ boolean quiet= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : MAX_WAIT_TIME, intervalTime);
Logger.global.exiting("EditorTestHelper", "joinJobs", new Boolean(quiet));
return quiet;
}
@@ -361,7 +363,7 @@ public class EditorTestHelper {
return !isRunning(cReconcilerAccessor, backgroundThreadAccessor);
}
};
- boolean finished= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : Long.MAX_VALUE, intervalTime);
+ boolean finished= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : MAX_WAIT_TIME, intervalTime);
Logger.global.exiting("EditorTestHelper", "joinReconciler", new Boolean(finished));
return finished;
}

Back to the top