Skip to content

Commit

Permalink
Fix flaky test addSnapshotLifecyclePolicy (elastic#46881)
Browse files Browse the repository at this point in the history
* 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 af4864c)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
  • Loading branch information
andreidan committed Sep 20, 2019
1 parent d2c4b3e commit a3af247
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit a3af247

Please sign in to comment.