Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Xenos2016-12-02 04:33:48 +0000
committerStefan Xenos2016-12-02 22:19:10 +0000
commit73770094c4f65d4f7343d820da475a1cbfa0ec9d (patch)
tree2dac6e0ce50fce097709bc4c3952003e737e2897 /org.eclipse.jdt.core.tests.builder
parentae0c0b277bccb3b847d745311d31f073db2a591f (diff)
downloadeclipse.jdt.core-73770094c4f65d4f7343d820da475a1cbfa0ec9d.tar.gz
eclipse.jdt.core-73770094c4f65d4f7343d820da475a1cbfa0ec9d.tar.xz
eclipse.jdt.core-73770094c4f65d4f7343d820da475a1cbfa0ec9d.zip
Bug 507571 - M3 Plugin JUnit tests give "Unable to index..."
Change the way file existence is checked. Rather than using File.exists(), we rely on exceptions thrown during read and the implicit existence check that occurs when testing fingerprints. Remove the call to File.exists(). Change exception handling such that exceptions indicating missing files are propagated reliably. Update the invalid archive cache to record an extra state if a missing file was the cause of the exception. Change the way nonexistent files are stored in the database. Previously, they were either left with a stale state from the last successful indexing operation or they were marked as corrupt files. Now they are stored in the same form as empty files (they can be disambiguated from empty files by examining the fingerprint). Omit logging any exceptions in response to missing files. Change-Id: I244bd781cd3ef77b661041302bbef32253330476 Signed-off-by: Stefan Xenos <sxenos@gmail.com>
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
index 40e1531d33..e6d2a97da9 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
@@ -21,6 +21,8 @@ import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.core.ClasspathEntry;
import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jdt.internal.core.nd.indexer.Indexer;
+
import java.io.*;
import java.util.*;
@@ -1093,6 +1095,7 @@ public void cleanBuild(String projectName) {
do {
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ Indexer.getInstance().waitForIndex(null);
wasInterrupted = false;
} catch (OperationCanceledException e) {
handle(e);
@@ -1108,6 +1111,7 @@ public void cleanBuild(String projectName) {
do {
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_REFRESH, null);
+ Indexer.getInstance().waitForIndex(null);
wasInterrupted = false;
} catch (OperationCanceledException e) {
handle(e);

Back to the top