Bring back tests for missing elements in the diff-serialized cluster state

We can add it back now that we improved our compression framework.

Closes #11257
This commit is contained in:
Igor Motov 2016-03-09 14:43:00 -05:00
parent e32da555aa
commit b10db19595
1 changed files with 2 additions and 2 deletions

View File

@ -1100,7 +1100,7 @@ public abstract class ESIntegTestCase extends ESTestCase {
// remove local node reference // remove local node reference
masterClusterState = ClusterState.Builder.fromBytes(masterClusterStateBytes, null); masterClusterState = ClusterState.Builder.fromBytes(masterClusterStateBytes, null);
Map<String, Object> masterStateMap = convertToMap(masterClusterState); Map<String, Object> masterStateMap = convertToMap(masterClusterState);
int masterClusterStateSize = masterClusterState.toString().length(); int masterClusterStateSize = ClusterState.Builder.toBytes(masterClusterState).length;
String masterId = masterClusterState.nodes().masterNodeId(); String masterId = masterClusterState.nodes().masterNodeId();
for (Client client : cluster().getClients()) { for (Client client : cluster().getClients()) {
ClusterState localClusterState = client.admin().cluster().prepareState().all().setLocal(true).get().getState(); ClusterState localClusterState = client.admin().cluster().prepareState().all().setLocal(true).get().getState();
@ -1108,7 +1108,7 @@ public abstract class ESIntegTestCase extends ESTestCase {
// remove local node reference // remove local node reference
localClusterState = ClusterState.Builder.fromBytes(localClusterStateBytes, null); localClusterState = ClusterState.Builder.fromBytes(localClusterStateBytes, null);
final Map<String, Object> localStateMap = convertToMap(localClusterState); final Map<String, Object> localStateMap = convertToMap(localClusterState);
final int localClusterStateSize = localClusterState.toString().length(); final int localClusterStateSize = ClusterState.Builder.toBytes(localClusterState).length;
// Check that the non-master node has the same version of the cluster state as the master and // Check that the non-master node has the same version of the cluster state as the master and
// that the master node matches the master (otherwise there is no requirement for the cluster state to match) // that the master node matches the master (otherwise there is no requirement for the cluster state to match)
if (masterClusterState.version() == localClusterState.version() && masterId.equals(localClusterState.nodes().masterNodeId())) { if (masterClusterState.version() == localClusterState.version() && masterId.equals(localClusterState.nodes().masterNodeId())) {