|
@@ -1767,7 +1767,9 @@ public class SearchServiceTests extends ESSingleNodeTestCase {
|
|
|
final IndexService indexService = indicesService.indexServiceSafe(resolveIndex("index"));
|
|
|
final IndexShard indexShard = indexService.getShard(0);
|
|
|
SearchRequest searchRequest = new SearchRequest().allowPartialSearchResults(true);
|
|
|
- searchRequest.setWaitForCheckpointsTimeout(TimeValue.timeValueMillis(randomIntBetween(10, 100)));
|
|
|
+ // Increased timeout to avoid cancelling the search task prior to its completion,
|
|
|
+ // as we expect to raise an Exception. Timeout itself is tested on the following `testWaitOnRefreshTimeout` test.
|
|
|
+ searchRequest.setWaitForCheckpointsTimeout(TimeValue.timeValueMillis(randomIntBetween(200, 300)));
|
|
|
searchRequest.setWaitForCheckpoints(Collections.singletonMap("index", new long[] { 1 }));
|
|
|
|
|
|
final DocWriteResponse response = prepareIndex("index").setSource("id", "1").get();
|