3939import static org .elasticsearch .xpack .TimeSeriesRestDriver .createNewSingletonPolicy ;
4040import static org .elasticsearch .xpack .TimeSeriesRestDriver .createSnapshotRepo ;
4141import static org .elasticsearch .xpack .TimeSeriesRestDriver .explainIndex ;
42- import static org .elasticsearch .xpack .TimeSeriesRestDriver .getBackingIndices ;
4342import static org .elasticsearch .xpack .TimeSeriesRestDriver .getOnlyIndexSettings ;
4443import static org .elasticsearch .xpack .TimeSeriesRestDriver .getStepKeyForIndex ;
4544import static org .elasticsearch .xpack .TimeSeriesRestDriver .getTemplate ;
@@ -80,12 +79,12 @@ public void testRolloverAction() throws Exception {
8079 indexDocument (client (), dataStream , true );
8180
8281 assertBusy (() -> {
83- final var backingIndices = getBackingIndices ( client (), dataStream );
82+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
8483 assertEquals (2 , backingIndices .size ());
8584 assertTrue (Boolean .parseBoolean ((String ) getIndexSettingsAsMap (backingIndices .get (1 )).get ("index.hidden" )));
8685 });
8786 assertBusy (() -> {
88- final var backingIndices = getBackingIndices ( client (), dataStream );
87+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
8988 assertEquals (PhaseCompleteStep .finalStep ("hot" ).getKey (), getStepKeyForIndex (client (), backingIndices .get (0 )));
9089 });
9190 }
@@ -97,7 +96,7 @@ public void testRolloverIsSkippedOnManualDataStreamRollover() throws Exception {
9796
9897 indexDocument (client (), dataStream , true );
9998
100- String firstGenerationIndex = getBackingIndices ( client (), dataStream ).get (0 );
99+ String firstGenerationIndex = getDataStreamBackingIndexNames ( dataStream ).get (0 );
101100 assertBusy (
102101 () -> assertThat (getStepKeyForIndex (client (), firstGenerationIndex ).name (), equalTo (WaitForRolloverReadyStep .NAME )),
103102 30 ,
@@ -106,7 +105,7 @@ public void testRolloverIsSkippedOnManualDataStreamRollover() throws Exception {
106105
107106 rolloverMaxOneDocCondition (client (), dataStream );
108107 assertBusy (() -> {
109- final var backingIndices = getBackingIndices ( client (), dataStream );
108+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
110109 assertEquals (2 , backingIndices .size ());
111110 }, 30 , TimeUnit .SECONDS );
112111
@@ -124,7 +123,7 @@ public void testShrinkActionInPolicyWithoutHotPhase() throws Exception {
124123 createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
125124 indexDocument (client (), dataStream , true );
126125
127- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
126+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
128127 assertBusy (
129128 () -> assertThat (
130129 "original index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -139,7 +138,7 @@ public void testShrinkActionInPolicyWithoutHotPhase() throws Exception {
139138 rolloverMaxOneDocCondition (client (), dataStream );
140139 // Wait for rollover to happen
141140 assertBusy (
142- () -> assertEquals ("the rollover action created the rollover index" , 2 , getBackingIndices ( client (), dataStream ).size ()),
141+ () -> assertEquals ("the rollover action created the rollover index" , 2 , getDataStreamBackingIndexNames ( dataStream ).size ()),
143142 30 ,
144143 TimeUnit .SECONDS
145144 );
@@ -158,7 +157,7 @@ public void testSearchableSnapshotAction() throws Exception {
158157 createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
159158 indexDocument (client (), dataStream , true );
160159
161- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
160+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
162161 String restoredIndexName = SearchableSnapshotAction .FULL_RESTORED_INDEX_PREFIX + backingIndexName ;
163162
164163 assertBusy (
@@ -189,7 +188,7 @@ public void testReadOnlyAction() throws Exception {
189188 createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
190189 indexDocument (client (), dataStream , true );
191190
192- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
191+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
193192 assertBusy (
194193 () -> assertThat (
195194 "index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -219,7 +218,7 @@ public void testFreezeAction() throws Exception {
219218 createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
220219 indexDocument (client (), dataStream , true );
221220
222- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
221+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
223222 assertBusy (
224223 () -> assertThat (
225224 "index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -248,7 +247,7 @@ public void checkForceMergeAction(String codec) throws Exception {
248247 createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
249248 indexDocument (client (), dataStream , true );
250249
251- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
250+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
252251 assertBusy (
253252 () -> assertThat (
254253 "index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -322,7 +321,7 @@ public void testDataStreamWithMultipleIndicesAndWriteIndexInDeletePhase() throws
322321 client ().performRequest (new Request ("POST" , dataStream + "/_rollover" ));
323322 indexDocument (client (), dataStream , true );
324323
325- String secondGenerationIndex = getBackingIndices ( client (), dataStream ).get (1 );
324+ String secondGenerationIndex = getDataStreamBackingIndexNames ( dataStream ).get (1 );
326325 assertBusy (() -> {
327326 Request explainRequest = new Request ("GET" , "/_data_stream/" + dataStream );
328327 Response response = client ().performRequest (explainRequest );
0 commit comments