Remove more explicit SearchResponse references from test code (#100985)

Follow-up to #100966 adding more overrides to assertions that
consume a request builder.
This commit is contained in:
Armin Braun 2023-10-18 07:20:01 +02:00 committed by GitHub
parent 96184ddb13
commit dcaba064dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 348 additions and 340 deletions

View file

@ -43,6 +43,7 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.histogra
import static org.elasticsearch.search.aggregations.AggregationBuilders.sum;
import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.bucketScript;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
import static org.elasticsearch.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.equalTo;
@ -129,8 +130,7 @@ public class MoreExpressionIT extends ESIntegTestCase {
score = ScoreFunctionBuilders.scriptFunction(new Script(ScriptType.INLINE, "expression", "1 / _score", Collections.emptyMap()));
req.addAggregation(AggregationBuilders.max("max_score").script((score).getScript()));
req.setSearchType(SearchType.DFS_QUERY_THEN_FETCH); // make sure DF is consistent
rsp = req.get();
assertSearchResponse(rsp);
assertNoFailures(req);
}
public void testDateMethods() throws Exception {