From b10db19595b0c638501a7dcd9e25cf860d0f5c98 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Wed, 9 Mar 2016 14:43:00 -0500 Subject: [PATCH] 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 --- .../src/main/java/org/elasticsearch/test/ESIntegTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index 235ccec4ee0..493efa9021e 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -1100,7 +1100,7 @@ public abstract class ESIntegTestCase extends ESTestCase { // remove local node reference masterClusterState = ClusterState.Builder.fromBytes(masterClusterStateBytes, null); Map masterStateMap = convertToMap(masterClusterState); - int masterClusterStateSize = masterClusterState.toString().length(); + int masterClusterStateSize = ClusterState.Builder.toBytes(masterClusterState).length; String masterId = masterClusterState.nodes().masterNodeId(); for (Client client : cluster().getClients()) { 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 localClusterState = ClusterState.Builder.fromBytes(localClusterStateBytes, null); final Map 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 // 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())) {