mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix random content assist test failures
This commit is contained in:
parent
15447a0c0b
commit
db312ccd1b
1 changed files with 5 additions and 1 deletions
|
@ -168,7 +168,11 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
|
||||||
assertTrue("No cursor location specified", fCursorOffset >= 0);
|
assertTrue("No cursor location specified", fCursorOffset >= 0);
|
||||||
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));
|
||||||
return createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
|
IFile sourceFile= createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
|
||||||
|
// for some unknown reason re-indexing is necessary,
|
||||||
|
// otherwise tests fail at random
|
||||||
|
CCorePlugin.getIndexManager().reindex(fCProject);
|
||||||
|
return sourceFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertCompletionResults(String[] expected) throws Exception {
|
protected void assertCompletionResults(String[] expected) throws Exception {
|
||||||
|
|
Loading…
Add table
Reference in a new issue