use of org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore in project jackrabbit-oak by apache.
the class AsyncIndexUpdateClusterTestIT method create.
private DocumentNodeStore create(int clusterId) {
DocumentMK.Builder builder = new DocumentMK.Builder();
if (ds == null) {
ds = new MemoryDocumentStore();
}
if (bs == null) {
bs = new MemoryBlobStore();
}
builder.setDocumentStore(ds).setBlobStore(bs);
DocumentNodeStore store = builder.setClusterId(++clusterId).setLeaseCheck(false).open().getNodeStore();
return store;
}
use of org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore in project jackrabbit-oak by apache.
the class ActiveDeletedBlobCollectorMBeanImplTest method orderOfFlaggingWaitForIndexersAndUpdateIndexFiles.
@Test
public void orderOfFlaggingWaitForIndexersAndUpdateIndexFiles() {
final AtomicBoolean isPaused = new AtomicBoolean();
final AtomicBoolean hadWaitedForIndex = new AtomicBoolean();
IndexPathService indexPathService = mock(IndexPathService.class);
when(indexPathService.getIndexPaths()).then(mockObj -> {
assertTrue("Must wait for indexers before going to update index files", hadWaitedForIndex.get());
return indexPaths;
});
AsyncIndexInfoService asyncIndexInfoService = MockRegistrar.getAsyncIndexInfoService(newArrayList(new IndexMBeanInfoSupplier("foo-async", () -> {
assertTrue("Must pause before waiting for indexers", isPaused.get());
hadWaitedForIndex.set(true);
return STATUS_DONE;
}, () -> 2L)));
ActiveDeletedBlobCollectorMBeanImpl bean = new ActiveDeletedBlobCollectorMBeanImpl(new PauseNotifyingActiveDeletedBlobCollector(() -> {
isPaused.set(true);
return null;
}), wb, nodeStore, indexPathService, asyncIndexInfoService, new MemoryBlobStore(), sameThreadExecutor());
bean.clock = clock;
bean.flagActiveDeletionUnsafeForCurrentState();
}
use of org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore in project jackrabbit-oak by apache.
the class ActiveDeletedBlobCollectorMBeanImplTest method getTestBean.
private ActiveDeletedBlobCollectorMBean getTestBean(IndexPathService indexPathService, AsyncIndexInfoService asyncIndexInfoService) {
ActiveDeletedBlobCollectorMBeanImpl bean = new ActiveDeletedBlobCollectorMBeanImpl(ActiveDeletedBlobCollectorFactory.NOOP, wb, nodeStore, indexPathService, asyncIndexInfoService, new MemoryBlobStore(), sameThreadExecutor());
bean.clock = clock;
return bean;
}
Aggregations