Test: fix npe
This commit is contained in:
parent
2b00ecb5b5
commit
68da7c05ee
|
@ -1053,7 +1053,8 @@ public class DiscoveryWithServiceDisruptionsTests extends ElasticsearchIntegrati
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue