use of com.hazelcast.config.MerkleTreeConfig in project hazelcast by hazelcast.
the class ExternalMemberConfigurationOverrideEnvTest method shouldHandleMapMerkleTreeConfig.
@Test
public void shouldHandleMapMerkleTreeConfig() throws Exception {
Config config = new Config();
MerkleTreeConfig merkleTreeConfig = new MerkleTreeConfig().setEnabled(false).setDepth(5);
config.getMapConfig("foo1").setBackupCount(4).setMerkleTreeConfig(merkleTreeConfig);
Map<String, String> envVariables = new HashMap<>();
envVariables.put("HZ_MAP_FOO1_BACKUPCOUNT", "2");
envVariables.put("HZ_MAP_FOO1_MERKLETREE_ENABLED", "true");
new ExternalConfigurationOverride(envVariables, System::getProperties).overwriteMemberConfig(config);
assertEquals(2, config.getMapConfig("foo1").getBackupCount());
assertTrue(config.getMapConfig("foo1").getMerkleTreeConfig().isEnabled());
assertEquals(5, config.getMapConfig("foo1").getMerkleTreeConfig().getDepth());
}
Aggregations