mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixes a test-failure.
This commit is contained in:
parent
ea9f24215d
commit
98d291ebd4
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ import junit.framework.Test;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -179,9 +180,9 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
|
||||||
sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
|
sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
|
||||||
assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
|
assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
|
||||||
IFile sourceFile= createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
|
IFile sourceFile= createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
|
||||||
// for some unknown reason re-indexing is necessary,
|
// re-indexing is necessary to parse the header in context of the source.
|
||||||
// otherwise tests fail at random
|
|
||||||
CCorePlugin.getIndexManager().reindex(fCProject);
|
CCorePlugin.getIndexManager().reindex(fCProject);
|
||||||
|
CCorePlugin.getIndexManager().joinIndexer(4000, new NullProgressMonitor());
|
||||||
return sourceFile;
|
return sourceFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue