浏览代码

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.
Andrei Dan 6 年之前
父节点
当前提交
af4864c391

+ 0 - 1
client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/ILMDocumentationIT.java

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