@Override protected Storage createStorage() { return InMemoryStorageFactory.newStorage(executorService()); }
TestContext(ReadIndexConfig readIndexConfig, CachePolicy cachePolicy) { this.cacheFactory = new TestCacheFactory(); this.metadata = new MetadataBuilder(CONTAINER_ID).build(); this.storage = InMemoryStorageFactory.newStorage(executorService()); this.storage.initialize(1); this.cacheManager = new TestCacheManager(cachePolicy, executorService()); this.readIndex = new ContainerReadIndex(readIndexConfig, this.metadata, this.cacheFactory, this.storage, this.cacheManager, executorService()); }
ContainerSetup(ScheduledExecutorService executorService) { this.dataLog = new AtomicReference<>(); this.executorService = executorService; this.dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, this.executorService), this.dataLog::set); this.metadata = new MetadataBuilder(CONTAINER_ID).build(); this.cacheFactory = new InMemoryCacheFactory(); this.storage = InMemoryStorageFactory.newStorage(executorService); this.storage.initialize(1); this.cacheManager = new CacheManager(CachePolicy.INFINITE, this.executorService); this.readIndex = new ContainerReadIndex(DEFAULT_READ_INDEX_CONFIG, metadata, this.cacheFactory, this.storage, this.cacheManager, this.executorService); }
Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); byte[] segmentData = populateSegment(storage);
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService()), dataLog::set); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); UpdateableContainerMetadata metadata = new MetadataBuilder(CONTAINER_ID).build();
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService()), dataLog::set); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); UpdateableContainerMetadata metadata = new MetadataBuilder(CONTAINER_ID).build();
TestContext() { this.cacheFactory = new InMemoryCacheFactory(); this.storage = InMemoryStorageFactory.newStorage(executorService()); this.storage.initialize(1); this.metadata = new MetadataBuilder(CONTAINER_ID).build(); ReadIndexConfig readIndexConfig = ReadIndexConfig.builder().with(ReadIndexConfig.STORAGE_READ_ALIGNMENT, 1024).build(); this.cacheManager = new CacheManager(CachePolicy.INFINITE, executorService()); this.readIndex = new ContainerReadIndex(readIndexConfig, this.metadata, this.cacheFactory, this.storage, this.cacheManager, executorService()); this.memoryLog = new SequencedItemList<>(); this.stateUpdater = new MemoryStateUpdater(this.memoryLog, this.readIndex, Runnables.doNothing()); }
public void testInvalidRequests() { @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); byte[] segmentData = populateSegment(storage);
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService())); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); long segmentId;
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService()), dataLog::set); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1);
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService()), dataLog::set); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1);
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService())); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1);
TestDurableDataLogFactory dataLogFactory = new TestDurableDataLogFactory(new InMemoryDurableDataLogFactory(MAX_DATA_LOG_APPEND_SIZE, executorService())); @Cleanup Storage storage = InMemoryStorageFactory.newStorage(executorService()); storage.initialize(1); val metadata1 = new MetadataBuilder(CONTAINER_ID).build();