mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
-got rid of joiner - it deadlocks
This commit is contained in:
parent
367979ea80
commit
e6358c05ce
1 changed files with 14 additions and 20 deletions
|
@ -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);
|
||||||
|
@ -87,7 +86,7 @@ public class CodanTestCase extends BaseTestCase {
|
||||||
try {
|
try {
|
||||||
cproject.getProject().refreshLocal(1, null);
|
cproject.getProject().refreshLocal(1, null);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
// hmm
|
// hmm
|
||||||
}
|
}
|
||||||
return testFile;
|
return testFile;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -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();
|
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||||
try {
|
workspace.run(new IWorkspaceRunnable() {
|
||||||
final IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
workspace.run(new IWorkspaceRunnable() {
|
cproject.getProject().refreshLocal(1, monitor);
|
||||||
public void run(IProgressMonitor monitor) throws CoreException {
|
}
|
||||||
cproject.getProject().refreshLocal(1, monitor);
|
}, null);
|
||||||
}
|
// Index the cproject
|
||||||
}, null);
|
CCorePlugin.getIndexManager().setIndexerId(cproject,
|
||||||
mj.join();
|
IPDOMManager.ID_FAST_INDEXER);
|
||||||
// Index the cproject
|
// wait until the indexer is done
|
||||||
CCorePlugin.getIndexManager().setIndexerId(cproject,
|
assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000*60, // 1 min
|
||||||
IPDOMManager.ID_FAST_INDEXER);
|
new NullProgressMonitor()));
|
||||||
// wait until the indexer is done
|
|
||||||
assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000,
|
|
||||||
new NullProgressMonitor()));
|
|
||||||
} finally {
|
|
||||||
mj.dispose();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue