Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-10-14 20:58:48 +0000
committerSergey Prigogin2011-10-14 20:58:48 +0000
commit8ae5715f10fd5c6b7e5591d4e845e2b335d6a82a (patch)
treec115887a83193e7d085e6d924cadbc0404c9f55d
parentdcc6b66ddf3fa3034bfbdf7ef51d0e8bb7ff2e5f (diff)
downloadorg.eclipse.cdt-8ae5715f10fd5c6b7e5591d4e845e2b335d6a82a.tar.gz
org.eclipse.cdt-8ae5715f10fd5c6b7e5591d4e845e2b335d6a82a.tar.xz
org.eclipse.cdt-8ae5715f10fd5c6b7e5591d4e845e2b335d6a82a.zip
Fixed test breakage caused by an additional index event.
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java
index 8be862dd17c..89fdf310f66 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java
@@ -101,9 +101,11 @@ public class IndexListenerTest extends BaseTestCase {
assertTrue(im.joinIndexer(10000, npm()));
IIndexChangeListener listener = new IIndexChangeListener() {
public void indexChanged(IIndexChangeEvent event) {
- synchronized (mutex) {
- projects.add(event.getAffectedProject());
- mutex.notify();
+ if (!event.getFilesWritten().isEmpty()) {
+ synchronized (mutex) {
+ projects.add(event.getAffectedProject());
+ mutex.notify();
+ }
}
}
};
@@ -119,7 +121,6 @@ public class IndexListenerTest extends BaseTestCase {
assertTrue(projects.contains(fProject1));
projects.clear();
-
IFile file1= TestSourceReader.createFile(fProject1.getProject(), "test.cpp", "int b;");
IFile file2= TestSourceReader.createFile(fProject2.getProject(), "test.cpp", "int c;");
synchronized (mutex) {

Back to the top