1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 04:15:35 +02:00

-got rid of joiner - it deadlocks

This commit is contained in:
Alena Laskavaia 2010-04-07 01:23:32 +00:00
parent 367979ea80
commit e6358c05ce

View file

@ -77,7 +77,6 @@ public class CodanTestCase extends BaseTestCase {
} catch (IOException e) { } catch (IOException e) {
fail("Cannot find java file: " + clazz + ": " + e.getMessage()); fail("Cannot find java file: " + clazz + ": " + e.getMessage());
} }
try { try {
File testFile = new File(tmpDir, file); File testFile = new File(tmpDir, file);
tempFiles.add(testFile); tempFiles.add(testFile);
@ -103,6 +102,7 @@ public class CodanTestCase extends BaseTestCase {
IResource.FORCE IResource.FORCE
| IResource.ALWAYS_DELETE_PROJECT_CONTENT, | IResource.ALWAYS_DELETE_PROJECT_CONTENT,
new NullProgressMonitor()); new NullProgressMonitor());
} catch (CoreException e) { } catch (CoreException e) {
throw e; throw e;
} }
@ -157,24 +157,18 @@ public class CodanTestCase extends BaseTestCase {
} }
protected void loadFiles() throws CoreException { protected void loadFiles() throws CoreException {
ModelJoiner mj = new ModelJoiner();
try {
final IWorkspace workspace = ResourcesPlugin.getWorkspace(); final IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.run(new IWorkspaceRunnable() { workspace.run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException { public void run(IProgressMonitor monitor) throws CoreException {
cproject.getProject().refreshLocal(1, monitor); cproject.getProject().refreshLocal(1, monitor);
} }
}, null); }, null);
mj.join();
// Index the cproject // Index the cproject
CCorePlugin.getIndexManager().setIndexerId(cproject, CCorePlugin.getIndexManager().setIndexerId(cproject,
IPDOMManager.ID_FAST_INDEXER); IPDOMManager.ID_FAST_INDEXER);
// wait until the indexer is done // wait until the indexer is done
assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000*60, // 1 min
new NullProgressMonitor())); new NullProgressMonitor()));
} finally {
mj.dispose();
}
return; return;
} }