Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugin/ilm/qa/multi-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ integTestCluster {
setting 'xpack.monitoring.enabled', 'false'
setting 'xpack.ml.enabled', 'false'
setting 'xpack.license.self_generated.type', 'trial'
setting 'indices.lifecycle.poll_interval', '2500ms'
setting 'indices.lifecycle.poll_interval', '1000ms'

}
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,19 @@ public void testFullPolicy() throws Exception {
updatePolicy(originalIndex, policy);
// index document {"foo": "bar"} to trigger rollover
index(client(), originalIndex, "_id", "foo", "bar");

/*
* These asserts are in the order that they should be satisfied in, in
* order to maximize the time for all operations to complete.
* An "out of order" assert here may result in this test occasionally
* timing out and failing inappropriately.
*/
// asserts that rollover was called
assertBusy(() -> assertTrue(indexExists(secondIndex)));
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
// asserts that shrink deleted the original index
assertBusy(() -> assertFalse(indexExists(originalIndex)));
// asserts that the delete phase completed for the managed shrunken index
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the order of these asserts is important in a non-obvious way, we should probably include a comment explaining why.

}

public void testMoveToAllocateStep() throws Exception {
Expand Down Expand Up @@ -150,9 +160,19 @@ public void testMoveToRolloverStep() throws Exception {
" }\n" +
"}");
client().performRequest(moveToStepRequest);

/*
* These asserts are in the order that they should be satisfied in, in
* order to maximize the time for all operations to complete.
* An "out of order" assert here may result in this test occasionally
* timing out and failing inappropriately.
*/
// asserts that rollover was called
assertBusy(() -> assertTrue(indexExists(secondIndex)));
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
// asserts that shrink deleted the original index
assertBusy(() -> assertFalse(indexExists(originalIndex)));
// asserts that the delete phase completed for the managed shrunken index
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the order of these asserts is important in a non-obvious way, we should probably include a comment explaining why.

}

public void testRolloverAction() throws Exception {
Expand Down