39
39
import static org .elasticsearch .xpack .TimeSeriesRestDriver .createNewSingletonPolicy ;
40
40
import static org .elasticsearch .xpack .TimeSeriesRestDriver .createSnapshotRepo ;
41
41
import static org .elasticsearch .xpack .TimeSeriesRestDriver .explainIndex ;
42
- import static org .elasticsearch .xpack .TimeSeriesRestDriver .getBackingIndices ;
43
42
import static org .elasticsearch .xpack .TimeSeriesRestDriver .getOnlyIndexSettings ;
44
43
import static org .elasticsearch .xpack .TimeSeriesRestDriver .getStepKeyForIndex ;
45
44
import static org .elasticsearch .xpack .TimeSeriesRestDriver .getTemplate ;
@@ -80,12 +79,12 @@ public void testRolloverAction() throws Exception {
80
79
indexDocument (client (), dataStream , true );
81
80
82
81
assertBusy (() -> {
83
- final var backingIndices = getBackingIndices ( client (), dataStream );
82
+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
84
83
assertEquals (2 , backingIndices .size ());
85
84
assertTrue (Boolean .parseBoolean ((String ) getIndexSettingsAsMap (backingIndices .get (1 )).get ("index.hidden" )));
86
85
});
87
86
assertBusy (() -> {
88
- final var backingIndices = getBackingIndices ( client (), dataStream );
87
+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
89
88
assertEquals (PhaseCompleteStep .finalStep ("hot" ).getKey (), getStepKeyForIndex (client (), backingIndices .get (0 )));
90
89
});
91
90
}
@@ -97,7 +96,7 @@ public void testRolloverIsSkippedOnManualDataStreamRollover() throws Exception {
97
96
98
97
indexDocument (client (), dataStream , true );
99
98
100
- String firstGenerationIndex = getBackingIndices ( client (), dataStream ).get (0 );
99
+ String firstGenerationIndex = getDataStreamBackingIndexNames ( dataStream ).get (0 );
101
100
assertBusy (
102
101
() -> assertThat (getStepKeyForIndex (client (), firstGenerationIndex ).name (), equalTo (WaitForRolloverReadyStep .NAME )),
103
102
30 ,
@@ -106,7 +105,7 @@ public void testRolloverIsSkippedOnManualDataStreamRollover() throws Exception {
106
105
107
106
rolloverMaxOneDocCondition (client (), dataStream );
108
107
assertBusy (() -> {
109
- final var backingIndices = getBackingIndices ( client (), dataStream );
108
+ final var backingIndices = getDataStreamBackingIndexNames ( dataStream );
110
109
assertEquals (2 , backingIndices .size ());
111
110
}, 30 , TimeUnit .SECONDS );
112
111
@@ -124,7 +123,7 @@ public void testShrinkActionInPolicyWithoutHotPhase() throws Exception {
124
123
createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
125
124
indexDocument (client (), dataStream , true );
126
125
127
- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
126
+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
128
127
assertBusy (
129
128
() -> assertThat (
130
129
"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 {
139
138
rolloverMaxOneDocCondition (client (), dataStream );
140
139
// Wait for rollover to happen
141
140
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 ()),
143
142
30 ,
144
143
TimeUnit .SECONDS
145
144
);
@@ -158,7 +157,7 @@ public void testSearchableSnapshotAction() throws Exception {
158
157
createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
159
158
indexDocument (client (), dataStream , true );
160
159
161
- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
160
+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
162
161
String restoredIndexName = SearchableSnapshotAction .FULL_RESTORED_INDEX_PREFIX + backingIndexName ;
163
162
164
163
assertBusy (
@@ -189,7 +188,7 @@ public void testReadOnlyAction() throws Exception {
189
188
createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
190
189
indexDocument (client (), dataStream , true );
191
190
192
- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
191
+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
193
192
assertBusy (
194
193
() -> assertThat (
195
194
"index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -219,7 +218,7 @@ public void testFreezeAction() throws Exception {
219
218
createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
220
219
indexDocument (client (), dataStream , true );
221
220
222
- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
221
+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
223
222
assertBusy (
224
223
() -> assertThat (
225
224
"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 {
248
247
createComposableTemplate (client (), template , dataStream + "*" , getTemplate (policyName ));
249
248
indexDocument (client (), dataStream , true );
250
249
251
- String backingIndexName = getBackingIndices ( client (), dataStream ).get (0 );
250
+ String backingIndexName = getDataStreamBackingIndexNames ( dataStream ).get (0 );
252
251
assertBusy (
253
252
() -> assertThat (
254
253
"index must wait in the " + CheckNotDataStreamWriteIndexStep .NAME + " until it is not the write index anymore" ,
@@ -322,7 +321,7 @@ public void testDataStreamWithMultipleIndicesAndWriteIndexInDeletePhase() throws
322
321
client ().performRequest (new Request ("POST" , dataStream + "/_rollover" ));
323
322
indexDocument (client (), dataStream , true );
324
323
325
- String secondGenerationIndex = getBackingIndices ( client (), dataStream ).get (1 );
324
+ String secondGenerationIndex = getDataStreamBackingIndexNames ( dataStream ).get (1 );
326
325
assertBusy (() -> {
327
326
Request explainRequest = new Request ("GET" , "/_data_stream/" + dataStream );
328
327
Response response = client ().performRequest (explainRequest );
0 commit comments