[Watcher] Fix tests due to upstream method signature change

Caused by elastic/elasticsearch#23288

Original commit: elastic/x-pack-elasticsearch@6f041708f9
This commit is contained in:
polyfractal 2017-02-21 13:48:53 -05:00
parent 9100fa6333
commit 45ecebac20
3 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ public class CompareConditionSearchTests extends AbstractWatcherIntegrationTestC
hit.shard(new SearchShardTarget("a", new Index("a", "indexUUID"), 0));
InternalSearchResponse internalSearchResponse = new InternalSearchResponse(
new SearchHits(new SearchHit[]{hit}, 1L, 1f), null, null, null, false, false);
new SearchHits(new SearchHit[]{hit}, 1L, 1f), null, null, null, false, false, 1);
SearchResponse response = new SearchResponse(internalSearchResponse, "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_watch_name", new Payload.XContent(response));

View File

@ -112,7 +112,7 @@ public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCa
hit.shard(new SearchShardTarget("a", new Index("a", "testUUID"), 0));
InternalSearchResponse internalSearchResponse = new InternalSearchResponse(new SearchHits(
new SearchHit[]{hit}, 1L, 1f), null, null, null, false, false);
new SearchHit[]{hit}, 1L, 1f), null, null, null, false, false, 1);
SearchResponse response = new SearchResponse(internalSearchResponse, "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_watch_name", new Payload.XContent(response));

View File

@ -278,7 +278,7 @@ public class TriggeredWatchStoreTests extends ESTestCase {
hit.sourceRef(new BytesArray("{}"));
hits = new SearchHits(new SearchHit[]{hit}, 1, 1.0f);
SearchResponse searchResponse2 = new SearchResponse(
new InternalSearchResponse(hits, null, null, null, false, null), "_scrollId", 1, 1, 1, null);
new InternalSearchResponse(hits, null, null, null, false, null, 1), "_scrollId", 1, 1, 1, null);
SearchResponse searchResponse3 = new SearchResponse(InternalSearchResponse.empty(), "_scrollId", 1, 1, 1, null);
when(clientProxy.searchScroll(eq("_scrollId"), any(TimeValue.class))).thenReturn(searchResponse2, searchResponse3);