Fix race condition causing test failure
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user