From 535ad23797f600e71dca1bb876836cb82e54c321 Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Fri, 14 Mar 2014 22:44:12 -0400 Subject: [PATCH] Fix intermittent test failures in codan Sometimes, index-based checkers (AbstractIndexAstChecker) were skipped because the indexer was not fully initialized so expected errors were not getting reported. Change-Id: Ibb764224f11ae4a867a4aa6b9de2b8ec55e90c55 Signed-off-by: Marc-Andre Laperle Reviewed-on: https://git.eclipse.org/r/23428 Reviewed-by: Nathan Ridge Tested-by: Hudson CI Reviewed-by: Sergey Prigogin --- .../src/org/eclipse/cdt/codan/core/test/CodanTestCase.java | 2 ++ 1 file changed, 2 insertions(+) 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 fb73bbe18eb..41af0bf470d 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 @@ -225,9 +225,11 @@ public class CodanTestCase extends BaseTestCase { currentFile = testFile; try { cproject.getProject().refreshLocal(1, null); + waitForIndexer(cproject); } catch (CoreException e) { // hmm fail(e.getMessage()); + } catch (InterruptedException e) { } currentCElem = cproject.findElement(new Path(currentFile.toString())); currentIFile = (IFile) currentCElem.getResource();