From 45ecebac20a3155f57ee5d77bcf042daf6a9da71 Mon Sep 17 00:00:00 2001 From: polyfractal Date: Tue, 21 Feb 2017 13:48:53 -0500 Subject: [PATCH] [Watcher] Fix tests due to upstream method signature change Caused by elastic/elasticsearch#23288 Original commit: elastic/x-pack-elasticsearch@6f041708f9643dc6749d22dbea541f8a454f77a6 --- .../xpack/watcher/condition/CompareConditionSearchTests.java | 2 +- .../xpack/watcher/condition/ScriptConditionSearchTests.java | 2 +- .../xpack/watcher/execution/TriggeredWatchStoreTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java index 5f9a800a7b6..3973e3b053e 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java @@ -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)); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java index ca6de3147d2..b0bc231aa2d 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java @@ -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)); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java index 0f9b9dce2ec..f782984a505 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java @@ -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);