@@ -155,7 +155,7 @@ class Cluster {
155
155
private final VotingConfiguration initialConfiguration ;
156
156
157
157
private final Set <String > disconnectedNodes = new HashSet <>();
158
- private final Set <String > partitionedNodes = new HashSet <>();
158
+ private final Set <String > blackholedNodes = new HashSet <>();
159
159
160
160
Cluster (int initialNodeCount ) {
161
161
logger .info ("--> creating cluster of {} nodes" , initialNodeCount );
@@ -229,7 +229,7 @@ private void assertUniqueLeaderAndExpectedModes() {
229
229
230
230
final String nodeId = clusterNode .getId ();
231
231
232
- if (disconnectedNodes .contains (nodeId ) || partitionedNodes .contains (nodeId )) {
232
+ if (disconnectedNodes .contains (nodeId ) || blackholedNodes .contains (nodeId )) {
233
233
assertThat (nodeId + " is a candidate" , clusterNode .coordinator .getMode (), is (CANDIDATE ));
234
234
} else {
235
235
assertThat (nodeId + " has the same term as the leader" , clusterNode .coordinator .getCurrentTerm (), is (leaderTerm ));
@@ -257,7 +257,7 @@ ClusterNode getAnyLeader() {
257
257
258
258
private ConnectionStatus getConnectionStatus (DiscoveryNode sender , DiscoveryNode destination ) {
259
259
ConnectionStatus connectionStatus ;
260
- if (partitionedNodes .contains (sender .getId ()) || partitionedNodes .contains (destination .getId ())) {
260
+ if (blackholedNodes .contains (sender .getId ()) || blackholedNodes .contains (destination .getId ())) {
261
261
connectionStatus = ConnectionStatus .BLACK_HOLE ;
262
262
} else if (disconnectedNodes .contains (sender .getId ()) || disconnectedNodes .contains (destination .getId ())) {
263
263
connectionStatus = ConnectionStatus .DISCONNECTED ;
@@ -396,7 +396,7 @@ void disconnect() {
396
396
}
397
397
398
398
void partition () {
399
- partitionedNodes .add (localNode .getId ());
399
+ blackholedNodes .add (localNode .getId ());
400
400
}
401
401
}
402
402
0 commit comments