update ILM integ test cluster poll interval to 1s (#35113)

This commit is contained in:
Tal Levy 2018-10-31 17:09:35 -07:00 committed by GitHub
parent 5f4b23f8c1
commit f8e23f6400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 3 deletions

View File

@ -15,6 +15,6 @@ integTestCluster {
setting 'xpack.monitoring.enabled', 'false' setting 'xpack.monitoring.enabled', 'false'
setting 'xpack.ml.enabled', 'false' setting 'xpack.ml.enabled', 'false'
setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.license.self_generated.type', 'trial'
setting 'indices.lifecycle.poll_interval', '2500ms' setting 'indices.lifecycle.poll_interval', '1000ms'
} }

View File

@ -82,9 +82,19 @@ public class TimeSeriesLifecycleActionsIT extends ESRestTestCase {
updatePolicy(originalIndex, policy); updatePolicy(originalIndex, policy);
// index document {"foo": "bar"} to trigger rollover // index document {"foo": "bar"} to trigger rollover
index(client(), originalIndex, "_id", "foo", "bar"); 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(() -> assertTrue(indexExists(secondIndex)));
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex))); // asserts that shrink deleted the original index
assertBusy(() -> assertFalse(indexExists(originalIndex))); assertBusy(() -> assertFalse(indexExists(originalIndex)));
// asserts that the delete phase completed for the managed shrunken index
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
} }
public void testMoveToAllocateStep() throws Exception { public void testMoveToAllocateStep() throws Exception {
@ -150,9 +160,19 @@ public class TimeSeriesLifecycleActionsIT extends ESRestTestCase {
" }\n" + " }\n" +
"}"); "}");
client().performRequest(moveToStepRequest); 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(() -> assertTrue(indexExists(secondIndex)));
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex))); // asserts that shrink deleted the original index
assertBusy(() -> assertFalse(indexExists(originalIndex))); assertBusy(() -> assertFalse(indexExists(originalIndex)));
// asserts that the delete phase completed for the managed shrunken index
assertBusy(() -> assertFalse(indexExists(shrunkenOriginalIndex)));
} }
public void testRolloverAction() throws Exception { public void testRolloverAction() throws Exception {