public void testBackupMigrationAndRecovery2() throws Exception {
testBackupMigrationAndRecovery(7, 2, 5000);
}
private void testBackupMigrationAndRecovery(int nodeCount, int backupCount, int mapSize) throws Exception {
TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(nodeCount);
final String name = MAP_NAME;
final Config config = new Config();
config.setProperty(GroupProperties.PROP_PARTITION_BACKUP_SYNC_INTERVAL, "5");
config.getMapConfig(name).setBackupCount(backupCount).setStatisticsEnabled(true);
final HazelcastInstance[] instances = new HazelcastInstance[nodeCount];
HazelcastInstance hz = nodeFactory.newHazelcastInstance(config);
instances[0] = hz;
IMap<Integer, String> map1 = hz.getMap(name);
for (int i = 0; i < mapSize; i++) {
map1.put(i, "value" + i);
}
checkMapSizes(mapSize, backupCount, instances);
for (int i = 1; i < nodeCount; i++) {
instances[i] = nodeFactory.newHazelcastInstance(config);
checkMapSizes(mapSize, backupCount, instances);
}
final Random rand = new Random();
for (int i = 1; i < nodeCount; i++) {