use of org.apache.lucene.store.NIOFSDirectory in project crate by crate.
the class StoreTests method testGetPendingFiles.
public void testGetPendingFiles() throws IOException {
final ShardId shardId = new ShardId("index", "_na_", 1);
final String testfile = "testfile";
try (Store store = new Store(shardId, INDEX_SETTINGS, new NIOFSDirectory(createTempDir()), new DummyShardLock(shardId))) {
store.directory().createOutput(testfile, IOContext.DEFAULT).close();
try (IndexInput input = store.directory().openInput(testfile, IOContext.DEFAULT)) {
store.directory().deleteFile(testfile);
assertEquals(FilterDirectory.unwrap(store.directory()).getPendingDeletions(), store.directory().getPendingDeletions());
}
}
}
Aggregations