waitForValue(client1, "key", "value", 2000, "client1");
nodes.remove(0);
nodeString = mapper.writeValueAsString(nodes);
SyncManager oldNode = syncManagers[0];
syncManagers = Arrays.copyOfRange(syncManagers, 1, 4);
moduleContexts = Arrays.copyOfRange(moduleContexts, 1, 4);
try {
for(int i = 0; i < syncManagers.length; i++) {
moduleContexts[i].addConfigParam(syncManagers[i],
"nodes", nodeString);
syncManagers[i].doUpdateConfiguration();
waitForConnection(syncManagers[i], (short)1, false, 2000);
}
} finally {
oldNode.shutdown();
}
waitForFullMesh(2000);
client1.put("newkey", "newvalue");
waitForValue(client2, "key", "value", 2000, "client4");