Clarify cluster state local node validation

This commit is contained in:
Jason Tedor 2016-04-05 12:49:43 -04:00
parent cffc315dca
commit 7cdd647d7b
2 changed files with 3 additions and 3 deletions

View File

@ -404,7 +404,7 @@ public class PublishClusterStateAction extends AbstractComponent {
if (currentNodes.getLocalNode().equals(incomingState.nodes().getLocalNode()) == false) {
logger.warn("received a cluster state from [{}] and not part of the cluster, should not happen", incomingState.nodes().getMasterNode());
throw new IllegalStateException("received state from local node that does not match the current local node");
throw new IllegalStateException("received state with a local node that does not match the current local node");
}
ZenDiscovery.validateStateIsFromCurrentMaster(logger, currentNodes, incomingState);

View File

@ -635,7 +635,7 @@ public class PublishClusterStateActionTests extends ESTestCase {
node.action.validateIncomingState(state, node.clusterState);
fail("node accepted state with non-existence local node");
} catch (IllegalStateException OK) {
assertThat(OK.toString(), containsString("received state from local node that does not match the current local node"));
assertThat(OK.toString(), containsString("received state with a local node that does not match the current local node"));
}
try {
@ -646,7 +646,7 @@ public class PublishClusterStateActionTests extends ESTestCase {
node.action.validateIncomingState(state, node.clusterState);
fail("node accepted state with existent but wrong local node");
} catch (IllegalStateException OK) {
assertThat(OK.toString(), containsString("received state from local node that does not match the current local node"));
assertThat(OK.toString(), containsString("received state with a local node that does not match the current local node"));
}
logger.info("--> testing acceptance of an old cluster state");