InternalTestCluster shouldn't auto heal an active disruption when a new one is set

Instead people should explicitly clear the existing one so it's clear what's going on.
This commit is contained in:
Boaz Leskes 2016-12-06 19:09:21 +01:00
parent 6da44c8164
commit 4519bdfeb0
2 changed files with 3 additions and 2 deletions

View File

@ -1213,7 +1213,7 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
for (String node : nodes) {
assertNoMaster(node);
}
isolateAllNodes.stopDisrupting();
internalCluster().clearDisruptionScheme();
ensureStableCluster(3);
final String preferredMasterName = internalCluster().getMasterName();
final DiscoveryNode preferredMaster = internalCluster().clusterService(preferredMasterName).localNode();

View File

@ -1756,7 +1756,8 @@ public final class InternalTestCluster extends TestCluster {
public void setDisruptionScheme(ServiceDisruptionScheme scheme) {
clearDisruptionScheme();
assert activeDisruptionScheme == null :
"there is already and active disruption [" + activeDisruptionScheme + "]. call clearDisruptionScheme first";
scheme.applyToCluster(this);
activeDisruptionScheme = scheme;
}