1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 03:15:33 +02:00

BaseUITestCase.waitForIndexer() intermittently throws exception

This commit is contained in:
John Cortell 2012-08-22 15:08:31 -05:00
parent ab22bbda2d
commit 82a89c35ed

View file

@ -125,6 +125,7 @@ public class BaseUITestCase extends BaseTestCase {
if (CCorePlugin.getIndexManager().isIndexerSetupPostponed(CoreModel.getDefault().create(file.getProject()))) if (CCorePlugin.getIndexManager().isIndexerSetupPostponed(CoreModel.getDefault().create(file.getProject())))
continue; continue;
try {
index.acquireReadLock(); index.acquireReadLock();
try { try {
IIndexFile[] indexFiles= index.getFiles(IndexLocationFactory.getWorkspaceIFL(file)); IIndexFile[] indexFiles= index.getFiles(IndexLocationFactory.getWorkspaceIFL(file));
@ -141,6 +142,10 @@ public class BaseUITestCase extends BaseTestCase {
} }
} }
} }
catch (InterruptedException e) {
// index.acquireReadLock() can be interrupted
}
}
throw new Exception("Indexer did not complete in time!"); throw new Exception("Indexer did not complete in time!");
} }