Fix race condition causing test failure

This commit is contained in:
Kris De Volder
2019-06-17 11:06:43 -07:00
parent e003a94c5e
commit 193f1e4018
2 changed files with 1 additions and 2 deletions

View File

@@ -324,7 +324,7 @@ public class SpringSymbolIndex implements InitializingBean {
return "";
}
};
futures.add(CompletableFuture.runAsync(() -> updateItem(maybeProject.get(), docURI, lastModified, content, indexer), this.updateQueue));
futures.add(updateItem(maybeProject.get(), docURI, lastModified, content, indexer));
}
catch (Exception e) {
log.error("", e);

View File

@@ -193,7 +193,6 @@ public class SpringIndexerTest {
@Test
public void testNewDocumentCreated() throws Exception {
String createdDocURI = directory.toPath().resolve("src/main/java/org/test/CreatedClass.java").toUri().toString();
// check for document to not be created yet
List<? extends SymbolInformation> symbols = indexer.getSymbols(createdDocURI);
assertNotNull(symbols);