@@ -154,7 +154,7 @@ public void testRetentionLeaseIsTakenAtTheStartOfRecovery() throws Exception {
154
154
// ensure that a retention lease has been put in place on each shard
155
155
assertBusy (() -> {
156
156
final IndicesStatsResponse stats =
157
- leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().indices (leaderIndex )).actionGet ();
157
+ leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().clear (). indices (leaderIndex )).actionGet ();
158
158
assertNotNull (stats .getShards ());
159
159
assertThat (stats .getShards (), arrayWithSize (numberOfShards * (1 + numberOfReplicas )));
160
160
final List <ShardStats > shardStats = getShardStats (stats );
@@ -231,7 +231,7 @@ public void testRetentionLeaseIsRenewedDuringRecovery() throws Exception {
231
231
assertBusy (() -> {
232
232
retentionLeases .clear ();
233
233
final IndicesStatsResponse stats =
234
- leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().indices (leaderIndex )).actionGet ();
234
+ leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().clear (). indices (leaderIndex )).actionGet ();
235
235
assertNotNull (stats .getShards ());
236
236
assertThat (stats .getShards (), arrayWithSize (numberOfShards * (1 + numberOfReplicas )));
237
237
final List <ShardStats > shardStats = getShardStats (stats );
@@ -251,7 +251,7 @@ public void testRetentionLeaseIsRenewedDuringRecovery() throws Exception {
251
251
// now ensure that the retention leases are being renewed
252
252
assertBusy (() -> {
253
253
final IndicesStatsResponse stats =
254
- leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().indices (leaderIndex )).actionGet ();
254
+ leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().clear (). indices (leaderIndex )).actionGet ();
255
255
assertNotNull (stats .getShards ());
256
256
assertThat (stats .getShards (), arrayWithSize (numberOfShards * (1 + numberOfReplicas )));
257
257
final List <ShardStats > shardStats = getShardStats (stats );
@@ -316,7 +316,7 @@ public void testRetentionLeasesAreNotBeingRenewedAfterRecoveryCompletes() throws
316
316
assertBusy (() -> {
317
317
retentionLeases .clear ();
318
318
final IndicesStatsResponse stats =
319
- leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().indices (leaderIndex )).actionGet ();
319
+ leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().clear (). indices (leaderIndex )).actionGet ();
320
320
assertNotNull (stats .getShards ());
321
321
assertThat (stats .getShards (), arrayWithSize (numberOfShards * (1 + numberOfReplicas )));
322
322
final List <ShardStats > shardStats = getShardStats (stats );
@@ -346,7 +346,7 @@ public void testRetentionLeasesAreNotBeingRenewedAfterRecoveryCompletes() throws
346
346
// now ensure that the retention leases are the same
347
347
assertBusy (() -> {
348
348
final IndicesStatsResponse stats =
349
- leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().indices (leaderIndex )).actionGet ();
349
+ leaderClient ().admin ().indices ().stats (new IndicesStatsRequest ().clear (). indices (leaderIndex )).actionGet ();
350
350
assertNotNull (stats .getShards ());
351
351
assertThat (stats .getShards (), arrayWithSize (numberOfShards * (1 + numberOfReplicas )));
352
352
final List <ShardStats > shardStats = getShardStats (stats );
0 commit comments