diff --git a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalRequestIT.java b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalRequestIT.java index 49d5db32919..a043d90564f 100644 --- a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalRequestIT.java +++ b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalRequestIT.java @@ -147,7 +147,7 @@ public class RankEvalRequestIT extends ESIntegTestCase { specifications.add(amsterdamRequest); SearchSourceBuilder brokenQuery = new SearchSourceBuilder(); - RangeQueryBuilder brokenRangeQuery = new RangeQueryBuilder("text").timeZone("CET"); + RangeQueryBuilder brokenRangeQuery = new RangeQueryBuilder("text").timeZone("CET").from("Basel").to("Zehlendorf"); brokenQuery.query(brokenRangeQuery); RatedRequest brokenRequest = new RatedRequest("broken_query", createRelevant("1"), brokenQuery); diff --git a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RatedRequestsTests.java b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RatedRequestsTests.java index f046f20a30d..3b7d64ff4c7 100644 --- a/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RatedRequestsTests.java +++ b/modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RatedRequestsTests.java @@ -215,7 +215,7 @@ public class RatedRequestsTests extends ESTestCase { break; case 1: if (testRequest != null) { - int size = randomValueOtherThan(testRequest.size(), () -> randomInt()); + int size = randomValueOtherThan(testRequest.size(), () -> randomInt(Integer.MAX_VALUE)); testRequest = new SearchSourceBuilder(); testRequest.size(size); testRequest.query(new MatchAllQueryBuilder()); diff --git a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml b/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml index 1d19a94cdac..f3b7bf4627e 100644 --- a/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml +++ b/modules/rank-eval/src/test/resources/rest-api-spec/test/rank_eval/30_failures.yml @@ -23,7 +23,7 @@ }, { "id" : "invalid_query", - "request": { "query": { "range" : { "bar" : { "time_zone": "+01:00" }}}}, + "request": { "query": { "range" : { "bar" : { "from" : "Basel", "time_zone": "+01:00" }}}}, "ratings": [{"_index": "foo", "_type": "bar", "_id": "doc1", "rating": 1}] } ],