Skip to content

Commit 37653c9

Browse files
committed
[TEST] AggregationsIntegrationIT#testScroll can timeout
This change sets the scroll timeout for this test to 1m instead of 500ms in order to avoid loosing the scroll on slow machines. Relates #26378
1 parent d01fcee commit 37653c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
3232
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
33+
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
3334
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
3435

3536

@@ -52,7 +53,7 @@ public void setupSuiteScopeCluster() throws Exception {
5253
public void testScroll() {
5354
final int size = randomIntBetween(1, 4);
5455
SearchResponse response = client().prepareSearch("index")
55-
.setSize(size).setScroll(new TimeValue(500))
56+
.setSize(size).setScroll(TimeValue.timeValueMinutes(1))
5657
.addAggregation(terms("f").field("f")).get();
5758
assertSearchResponse(response);
5859
Aggregations aggregations = response.getAggregations();
@@ -63,8 +64,9 @@ public void testScroll() {
6364
int total = response.getHits().getHits().length;
6465
while (response.getHits().getHits().length > 0) {
6566
response = client().prepareSearchScroll(response.getScrollId())
66-
.setScroll(new TimeValue(500))
67+
.setScroll(TimeValue.timeValueMinutes(1))
6768
.execute().actionGet();
69+
assertSearchResponse(response);
6870
assertNull(response.getAggregations());
6971
total += response.getHits().getHits().length;
7072
}

0 commit comments

Comments
 (0)