Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2008-03-28 16:15:50 +0000
committerAnton Leherbauer2008-03-28 16:15:50 +0000
commitdb312ccd1b4aa8f9319c3757cbe6a6e13d08ceac (patch)
treefa77874e7ee49b0dbca1da160b553fb57cd41db8 /core/org.eclipse.cdt.ui.tests
parent15447a0c0bafecfcbc2038502c4f0e2bfd9da7e1 (diff)
downloadorg.eclipse.cdt-db312ccd1b4aa8f9319c3757cbe6a6e13d08ceac.tar.gz
org.eclipse.cdt-db312ccd1b4aa8f9319c3757cbe6a6e13d08ceac.tar.xz
org.eclipse.cdt-db312ccd1b4aa8f9319c3757cbe6a6e13d08ceac.zip
Fix random content assist test failures
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java
index f9096214d37..daeada3ec7a 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java
@@ -168,7 +168,11 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
assertTrue("No cursor location specified", fCursorOffset >= 0);
sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
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 {

Back to the top