Skip to content

Commit 34659a8

Browse files
committed
fixing test
1 parent 4b69095 commit 34659a8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
import static org.hamcrest.Matchers.matchesRegex;
106106
import static org.hamcrest.Matchers.not;
107107
import static org.hamcrest.Matchers.nullValue;
108-
import static org.mockito.ArgumentMatchers.any;
109108
import static org.mockito.Mockito.mock;
110109
import static org.mockito.Mockito.when;
111110

@@ -614,13 +613,11 @@ public void testStatsByShardDoesNotDieFromExpectedExceptions() {
614613

615614
shardStats.add(successfulShardStats);
616615

617-
when(mockIndicesService.indexShardStats(mockIndicesService, shard, CommonStatsFlags.ALL, any())).thenReturn(
616+
when(mockIndicesService.indexShardStats(mockIndicesService, shard, CommonStatsFlags.ALL, 0L)).thenReturn(
618617
successfulShardStats
619618
);
620619
} else {
621-
when(mockIndicesService.indexShardStats(mockIndicesService, shard, CommonStatsFlags.ALL, any())).thenThrow(
622-
expectedException
623-
);
620+
when(mockIndicesService.indexShardStats(mockIndicesService, shard, CommonStatsFlags.ALL, 0L)).thenThrow(expectedException);
624621
}
625622
}
626623

0 commit comments

Comments
 (0)