From a3af2471c8b3b6a6396455209fc375385b86f70e Mon Sep 17 00:00:00 2001 From: Andrei Dan Date: Fri, 20 Sep 2019 10:26:16 +0100 Subject: [PATCH] Fix flaky test addSnapshotLifecyclePolicy (#46881) * addSnapshotLifecyclePolicy drop version assertion This drops the assertion on the policy version (which was pinned to 1L) as we want to execute both put policy apis (sync and async) for documentation purposes. This will sometimes (depending on the async call) yield a version of 2L. Waiting for the async call to always complete could be an option but the test is already rather slow and it's a bit of an overkill as we're already verifying the policy was created. (cherry picked from commit af4864c39129bcdbf98d00223f445346a62075e4) Signed-off-by: Andrei Dan --- .../elasticsearch/client/documentation/ILMDocumentationIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java index 2d876905dfb55..1e8b08bda30cf 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java @@ -866,7 +866,6 @@ public void onFailure(Exception e) { assertNotNull(policyMeta); assertThat(retrievedPolicy, equalTo(policy)); - assertThat(policyVersion, equalTo(1L)); createIndex("idx", Settings.builder().put("index.number_of_shards", 1).build());