diff --git a/server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java b/server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java index b939d9a6848f7..a7f7904a026e2 100644 --- a/server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java +++ b/server/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java @@ -115,16 +115,16 @@ public void testMetadata() throws Exception { public void testMetadataVersion() { createIndex("index-1"); createIndex("index-2"); - long metadataVersion = client().admin().cluster().prepareState().get().getState().metaData().version(); - assertThat(metadataVersion, greaterThan(0L)); + long baselineVersion = client().admin().cluster().prepareState().get().getState().metaData().version(); + assertThat(baselineVersion, greaterThan(0L)); assertThat(client().admin().cluster().prepareState().setIndices("index-1").get().getState().metaData().version(), - equalTo(metadataVersion)); + greaterThanOrEqualTo(baselineVersion)); assertThat(client().admin().cluster().prepareState().setIndices("index-2").get().getState().metaData().version(), - equalTo(metadataVersion)); + greaterThanOrEqualTo(baselineVersion)); assertThat(client().admin().cluster().prepareState().setIndices("*").get().getState().metaData().version(), - equalTo(metadataVersion)); + greaterThanOrEqualTo(baselineVersion)); assertThat(client().admin().cluster().prepareState().setIndices("not-found").get().getState().metaData().version(), - equalTo(metadataVersion)); + greaterThanOrEqualTo(baselineVersion)); assertThat(client().admin().cluster().prepareState().clear().setMetaData(false).get().getState().metaData().version(), equalTo(0L)); }