Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorMarkus Schorn2012-09-14 07:31:39 +0000
committerMarkus Schorn2012-09-14 07:32:36 +0000
commitd643e121a097ff44f84c36da5c72a704999df3c8 (patch)
tree7c5361dea59d4f178f0404ed756672cc23f3446a /codan
parent9cdef8c443cdfc90ab09795cfaff9d0e43ac3242 (diff)
downloadorg.eclipse.cdt-d643e121a097ff44f84c36da5c72a704999df3c8.tar.gz
org.eclipse.cdt-d643e121a097ff44f84c36da5c72a704999df3c8.tar.xz
org.eclipse.cdt-d643e121a097ff44f84c36da5c72a704999df3c8.zip
Fix intermittent test failures.
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CheckerTestCase.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java6
2 files changed, 3 insertions, 5 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CheckerTestCase.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CheckerTestCase.java
index bf6736bb690..3aac43569a8 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CheckerTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CheckerTestCase.java
@@ -148,7 +148,7 @@ public class CheckerTestCase extends CodanTestCase {
public void runOnProject() {
try {
indexFiles();
- } catch (CoreException e) {
+ } catch (Exception e) {
fail(e.getMessage());
}
runCodan();
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
index 5ce5343e19d..fb73bbe18eb 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
@@ -127,7 +127,7 @@ public class CodanTestCase extends BaseTestCase {
return cprojects[0];
}
- protected void indexFiles() throws CoreException {
+ protected void indexFiles() throws CoreException, InterruptedException {
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
@@ -138,9 +138,7 @@ public class CodanTestCase extends BaseTestCase {
CCorePlugin.getIndexManager().setIndexerId(cproject, IPDOMManager.ID_FAST_INDEXER);
CCorePlugin.getIndexManager().reindex(cproject);
// wait until the indexer is done
- assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000 * 60, // 1 min
- new NullProgressMonitor()));
- return;
+ waitForIndexer(cproject);
}
/**

Back to the top