Re-enable test. Comment out synchronized suppliers for Jandex index

This commit is contained in:
BoykoAlex
2018-02-14 21:31:15 -05:00
parent 68f1608e61
commit fa219f40e7
3 changed files with 3 additions and 4 deletions

View File

@@ -27,7 +27,6 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.eclipse.lsp4j.SymbolInformation;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.ide.vscode.boot.java.Annotations;
import org.springframework.ide.vscode.boot.java.BootJavaLanguageServerComponents;
@@ -332,7 +331,7 @@ public class SpringIndexerTest {
return false;
}
@Ignore @Test
@Test
public void testRefreshOnProjectChange() throws Exception {
harness.intialize(new File(ProjectsHarness.class.getResource("/test-projects/test-annotation-indexing-parent/test-annotation-indexing/").toURI()));

View File

@@ -46,7 +46,7 @@ public abstract class JandexClasspath implements IClasspath {
private Supplier<JandexIndex> javaIndex;
public JandexClasspath() {
this.javaIndex = Suppliers.synchronizedSupplier(Suppliers.memoize(() -> createIndex()));
this.javaIndex = /*Suppliers.synchronizedSupplier(*/Suppliers.memoize(() -> createIndex())/*)*/;
}
protected JandexIndex createIndex() {

View File

@@ -127,7 +127,7 @@ public class JandexIndex {
this.knownPackages = new HashMap<>();
this.javadocProviderFactory = javadocProviderFactory;
classpathEntries.forEach(file -> {
index.put(file, Suppliers.synchronizedSupplier(Suppliers.memoize(() -> createIndex(file, indexFileFinder))));
index.put(file, /*Suppliers.synchronizedSupplier(*/Suppliers.memoize(() -> createIndex(file, indexFileFinder))/*)*/);
knownTypes.put(file, Suppliers.memoize(() -> getKnownTypesStream(file).collect(Collectors.toList())));
knownPackages.put(file, Suppliers.memoize(() -> getKnownPackages(file).collect(Collectors.toList())));
});