You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes the flakiness in testIdenticalSearchableSnapshotActionIsNoop and
testConvertingSearchableSnapshotFromFullToPartial caused by the fact that we
enabled ILM for the index and *after that* indexed a document. If ILM runs
very fast in CI the `indexDocument` call could fail, or in the case of
testIdenticalSearchableSnapshotActionIsNoop all the assertions in the test
will pass but the final one that checks there is one document indexed fails
because the `indexDocument` call didn't execute.
(cherry picked from commit 7d27d40)
Signed-off-by: Andrei Dan <[email protected]>
Copy file name to clipboardExpand all lines: x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -374,12 +374,14 @@ public void testIdenticalSearchableSnapshotActionIsNoop() throws Exception {
374
374
null
375
375
);
376
376
377
-
createIndex(index, Settings.builder()
378
-
.put(LifecycleSettings.LIFECYCLE_NAME, policy)
379
-
.build());
377
+
createIndex(index, Settings.EMPTY);
380
378
ensureGreen(index);
381
379
indexDocument(client(), index, true);
382
380
381
+
// enable ILM after we indexed a document as otherwise ILM might sometimes run so fast the indexDocument call will fail with
0 commit comments