use of com.hazelcast.map.impl.mapstore.writebehind.TemporaryBlockerMapStore in project hazelcast by hazelcast.
the class ClientWriteBehindFlushTest method testFlush_shouldNotCause_concurrentStoreOperation.
@Test
public void testFlush_shouldNotCause_concurrentStoreOperation() throws Exception {
int blockStoreOperationSeconds = 5;
TemporaryBlockerMapStore store = new TemporaryBlockerMapStore(blockStoreOperationSeconds);
Config config = newMapStoredConfig(store, 2);
TestHazelcastFactory hazelcastFactory = new TestHazelcastFactory();
hazelcastFactory.newHazelcastInstance(config);
IMap<String, String> map = hazelcastFactory.newHazelcastClient().getMap(MAP_NAME);
map.put("key", "value");
map.flush();
assertEquals("Expecting only one store after flush", 1, store.getStoreOperationCount());
hazelcastFactory.shutdownAll();
}
Aggregations