use of org.apache.geode.compression.SnappyCompressor in project geode by apache.
the class CompressionRegionConfigDUnitTest method testReplicatePersistentRegion.
/**
* Sanity check for two peers sharing a persisted replicated region.
*
* @throws Exception
*/
@Test
public void testReplicatePersistentRegion() throws Exception {
Compressor compressor = new SnappyCompressor();
assertTrue(createCompressedRegionOnVm(getVM(0), REGION_NAME, DataPolicy.PERSISTENT_REPLICATE, compressor, DISK_STORE));
assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.PERSISTENT_REPLICATE, compressor));
assertNull(putUsingVM(getVM(0), KEY_1, VALUE_1));
waitOnPut(getVM(1), KEY_1);
flushDiskStoreOnVM(getVM(0), DISK_STORE);
closeRegionOnVM(getVM(1), REGION_NAME);
assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.PERSISTENT_REPLICATE, compressor));
assertEquals(VALUE_1, getUsingVM(getVM(1), KEY_1));
cleanup(getVM(0));
}
Aggregations