@@ -125,6 +125,7 @@ public static ClusterIndexHealth randomIndexHealth(String indexName, ClusterHeal
125
125
randomInt (1000 ),
126
126
randomInt (1000 ),
127
127
randomInt (1000 ),
128
+ randomInt (1000 ),
128
129
randomFrom (ClusterHealthStatus .values ()),
129
130
shards
130
131
);
@@ -164,6 +165,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
164
165
"index" ,
165
166
"numberOfShards" ,
166
167
"numberOfReplicas" ,
168
+ "numberOfSearchReplicas" ,
167
169
"activeShards" ,
168
170
"relocatingShards" ,
169
171
"initializingShards" ,
@@ -178,6 +180,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
178
180
instance .getIndex () + randomAlphaOfLengthBetween (2 , 5 ),
179
181
instance .getNumberOfShards (),
180
182
instance .getNumberOfReplicas (),
183
+ instance .getNumberOfSearchReplicas (),
181
184
instance .getActiveShards (),
182
185
instance .getRelocatingShards (),
183
186
instance .getInitializingShards (),
@@ -191,6 +194,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
191
194
instance .getIndex (),
192
195
instance .getNumberOfShards () + between (1 , 10 ),
193
196
instance .getNumberOfReplicas (),
197
+ instance .getNumberOfSearchReplicas (),
194
198
instance .getActiveShards (),
195
199
instance .getRelocatingShards (),
196
200
instance .getInitializingShards (),
@@ -204,6 +208,21 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
204
208
instance .getIndex (),
205
209
instance .getNumberOfShards (),
206
210
instance .getNumberOfReplicas () + between (1 , 10 ),
211
+ instance .getNumberOfSearchReplicas (),
212
+ instance .getActiveShards (),
213
+ instance .getRelocatingShards (),
214
+ instance .getInitializingShards (),
215
+ instance .getUnassignedShards (),
216
+ instance .getActivePrimaryShards (),
217
+ instance .getStatus (),
218
+ instance .getShards ()
219
+ );
220
+ case "numberOfSearchReplicas" :
221
+ return new ClusterIndexHealth (
222
+ instance .getIndex (),
223
+ instance .getNumberOfShards (),
224
+ instance .getNumberOfReplicas (),
225
+ instance .getNumberOfSearchReplicas () + between (1 , 10 ),
207
226
instance .getActiveShards (),
208
227
instance .getRelocatingShards (),
209
228
instance .getInitializingShards (),
@@ -217,6 +236,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
217
236
instance .getIndex (),
218
237
instance .getNumberOfShards (),
219
238
instance .getNumberOfReplicas (),
239
+ instance .getNumberOfSearchReplicas (),
220
240
instance .getActiveShards () + between (1 , 10 ),
221
241
instance .getRelocatingShards (),
222
242
instance .getInitializingShards (),
@@ -230,6 +250,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
230
250
instance .getIndex (),
231
251
instance .getNumberOfShards (),
232
252
instance .getNumberOfReplicas (),
253
+ instance .getNumberOfSearchReplicas (),
233
254
instance .getActiveShards (),
234
255
instance .getRelocatingShards () + between (1 , 10 ),
235
256
instance .getInitializingShards (),
@@ -243,6 +264,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
243
264
instance .getIndex (),
244
265
instance .getNumberOfShards (),
245
266
instance .getNumberOfReplicas (),
267
+ instance .getNumberOfSearchReplicas (),
246
268
instance .getActiveShards (),
247
269
instance .getRelocatingShards (),
248
270
instance .getInitializingShards () + between (1 , 10 ),
@@ -256,6 +278,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
256
278
instance .getIndex (),
257
279
instance .getNumberOfShards (),
258
280
instance .getNumberOfReplicas (),
281
+ instance .getNumberOfSearchReplicas (),
259
282
instance .getActiveShards (),
260
283
instance .getRelocatingShards (),
261
284
instance .getInitializingShards (),
@@ -269,6 +292,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
269
292
instance .getIndex (),
270
293
instance .getNumberOfShards (),
271
294
instance .getNumberOfReplicas (),
295
+ instance .getNumberOfSearchReplicas (),
272
296
instance .getActiveShards (),
273
297
instance .getRelocatingShards (),
274
298
instance .getInitializingShards (),
@@ -287,6 +311,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
287
311
instance .getIndex (),
288
312
instance .getNumberOfShards (),
289
313
instance .getNumberOfReplicas (),
314
+ instance .getNumberOfSearchReplicas (),
290
315
instance .getActiveShards (),
291
316
instance .getRelocatingShards (),
292
317
instance .getInitializingShards (),
@@ -307,6 +332,7 @@ protected ClusterIndexHealth mutateInstance(ClusterIndexHealth instance) throws
307
332
instance .getIndex (),
308
333
instance .getNumberOfShards (),
309
334
instance .getNumberOfReplicas (),
335
+ instance .getNumberOfSearchReplicas (),
310
336
instance .getActiveShards (),
311
337
instance .getRelocatingShards (),
312
338
instance .getInitializingShards (),
0 commit comments