Skip to content

Commit

Permalink
Test: fix npe
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Mar 2, 2015
1 parent 2b00ecb commit 68da7c0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,8 @@ private void assertMaster(String masterNode, List<String> nodes) {
ClusterState state = getNodeClusterState(node);
String failMsgSuffix = "cluster_state:\n" + state.prettyPrint();
assertThat("wrong node count on [" + node + "]. " + failMsgSuffix, state.nodes().size(), equalTo(nodes.size()));
assertThat("wrong master on node [" + node + "]. " + failMsgSuffix, state.nodes().masterNode().name(), equalTo(masterNode));
String otherMasterNodeName = state.nodes().masterNode() != null ? state.nodes().masterNode().name() : null;
assertThat("wrong master on node [" + node + "]. " + failMsgSuffix, otherMasterNodeName, equalTo(masterNode));
}
}

Expand Down

0 comments on commit 68da7c0

Please sign in to comment.