Fix flaky test addSnapshotLifecyclePolicy (#46881) (#46912)

* 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 <andrei.dan@elastic.co>
This commit is contained in:
Andrei Dan 2019-09-20 15:07:54 +01:00 committed by GitHub
parent 938648fcff
commit 402fb5e882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -874,7 +874,6 @@ public class ILMDocumentationIT extends ESRestHighLevelClientTestCase {
assertNotNull(policyMeta);
assertThat(retrievedPolicy, equalTo(policy));
assertThat(policyVersion, equalTo(1L));
createIndex("idx", Settings.builder().put("index.number_of_shards", 1).build());