Fix more tests

This commit is contained in:
Christoph Büscher 2017-08-23 12:30:09 +02:00
parent 56360ecfb5
commit cb4fd3bac6
3 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ public class RankEvalRequestIT extends ESIntegTestCase {
specifications.add(amsterdamRequest); specifications.add(amsterdamRequest);
SearchSourceBuilder brokenQuery = new SearchSourceBuilder(); 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); brokenQuery.query(brokenRangeQuery);
RatedRequest brokenRequest = new RatedRequest("broken_query", createRelevant("1"), RatedRequest brokenRequest = new RatedRequest("broken_query", createRelevant("1"),
brokenQuery); brokenQuery);

View File

@ -215,7 +215,7 @@ public class RatedRequestsTests extends ESTestCase {
break; break;
case 1: case 1:
if (testRequest != null) { if (testRequest != null) {
int size = randomValueOtherThan(testRequest.size(), () -> randomInt()); int size = randomValueOtherThan(testRequest.size(), () -> randomInt(Integer.MAX_VALUE));
testRequest = new SearchSourceBuilder(); testRequest = new SearchSourceBuilder();
testRequest.size(size); testRequest.size(size);
testRequest.query(new MatchAllQueryBuilder()); testRequest.query(new MatchAllQueryBuilder());

View File

@ -23,7 +23,7 @@
}, },
{ {
"id" : "invalid_query", "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}] "ratings": [{"_index": "foo", "_type": "bar", "_id": "doc1", "rating": 1}]
} }
], ],