5959import static org .hamcrest .Matchers .equalTo ;
6060import static org .hamcrest .Matchers .greaterThan ;
6161import static org .hamcrest .Matchers .not ;
62+ import static org .hamcrest .Matchers .nullValue ;
6263
6364public class TimeSeriesLifecycleActionsIT extends ESRestTestCase {
6465 private String index ;
@@ -218,6 +219,7 @@ public void testRetryFailedShrinkAction() throws Exception {
218219 assertThat (getStepKeyForIndex (shrunkenIndex ), equalTo (TerminalPolicyStep .KEY ));
219220 assertThat (settings .get (IndexMetaData .SETTING_NUMBER_OF_SHARDS ), equalTo (String .valueOf (expectedFinalShards )));
220221 assertThat (settings .get (IndexMetaData .INDEX_BLOCKS_WRITE_SETTING .getKey ()), equalTo ("true" ));
222+ assertThat (settings .get (IndexMetaData .INDEX_ROUTING_REQUIRE_GROUP_SETTING .getKey () + "_id" ), nullValue ());
221223 });
222224 expectThrows (ResponseException .class , this ::indexDocument );
223225 }
@@ -461,6 +463,7 @@ public void testShrinkAction() throws Exception {
461463 assertThat (getStepKeyForIndex (shrunkenIndex ), equalTo (TerminalPolicyStep .KEY ));
462464 assertThat (settings .get (IndexMetaData .SETTING_NUMBER_OF_SHARDS ), equalTo (String .valueOf (expectedFinalShards )));
463465 assertThat (settings .get (IndexMetaData .INDEX_BLOCKS_WRITE_SETTING .getKey ()), equalTo ("true" ));
466+ assertThat (settings .get (IndexMetaData .INDEX_ROUTING_REQUIRE_GROUP_SETTING .getKey () + "_id" ), nullValue ());
464467 });
465468 expectThrows (ResponseException .class , this ::indexDocument );
466469 }
@@ -480,6 +483,7 @@ public void testShrinkSameShards() throws Exception {
480483 assertThat (getStepKeyForIndex (index ), equalTo (TerminalPolicyStep .KEY ));
481484 assertThat (settings .get (IndexMetaData .SETTING_NUMBER_OF_SHARDS ), equalTo (String .valueOf (numberOfShards )));
482485 assertNull (settings .get (IndexMetaData .INDEX_BLOCKS_WRITE_SETTING .getKey ()));
486+ assertThat (settings .get (IndexMetaData .INDEX_ROUTING_REQUIRE_GROUP_SETTING .getKey () + "_id" ), nullValue ());
483487 });
484488 }
485489
@@ -523,6 +527,7 @@ public void testShrinkDuringSnapshot() throws Exception {
523527 assertThat (getStepKeyForIndex (shrunkenIndex ), equalTo (TerminalPolicyStep .KEY ));
524528 assertThat (settings .get (IndexMetaData .SETTING_NUMBER_OF_SHARDS ), equalTo (String .valueOf (1 )));
525529 assertThat (settings .get (IndexMetaData .INDEX_BLOCKS_WRITE_SETTING .getKey ()), equalTo ("true" ));
530+ assertThat (settings .get (IndexMetaData .INDEX_ROUTING_REQUIRE_GROUP_SETTING .getKey () + "_id" ), nullValue ());
526531 }, 2 , TimeUnit .MINUTES );
527532 expectThrows (ResponseException .class , this ::indexDocument );
528533 // assert that snapshot succeeded
0 commit comments