diff options
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java index 8dc74110291..c966fbc200d 100644 --- a/container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java +++ b/container-search/src/test/java/com/yahoo/search/dispatch/DispatcherTest.java @@ -3,7 +3,7 @@ package com.yahoo.search.dispatch; import com.yahoo.compress.CompressionType; import com.yahoo.prelude.Pong; -import com.yahoo.prelude.fastsearch.VespaBackEndSearcher; +import com.yahoo.prelude.fastsearch.VespaBackend; import com.yahoo.search.Query; import com.yahoo.search.Result; import com.yahoo.search.cluster.ClusterMonitor; @@ -18,7 +18,6 @@ import com.yahoo.search.dispatch.searchcluster.Pinger; import com.yahoo.search.dispatch.searchcluster.PongHandler; import com.yahoo.search.dispatch.searchcluster.SearchCluster; import com.yahoo.search.dispatch.searchcluster.SearchGroups; -import com.yahoo.search.searchchain.Execution; import com.yahoo.vespa.config.search.DispatchConfig; import com.yahoo.vespa.config.search.DispatchNodesConfig; import com.yahoo.yolean.UncheckedInterruptedException; @@ -237,19 +236,19 @@ public class DispatcherTest { // This factory just forwards search to the dummy RPC layer above, nothing more. InvokerFactoryFactory invokerFactories = (rpcConnectionPool, searchGroups, dispatchConfig) -> new InvokerFactory(searchGroups, dispatchConfig) { - @Override protected Optional<SearchInvoker> createNodeSearchInvoker(VespaBackEndSearcher searcher, Query query, int maxHits, Node node) { + @Override protected Optional<SearchInvoker> createNodeSearchInvoker(VespaBackend searcher, Query query, int maxHits, Node node) { return Optional.of(new SearchInvoker(Optional.of(node)) { @Override protected Object sendSearchRequest(Query query, Object context) { rpcPool.getConnection(node.key()).request(null, null, 0, null, null, 0); return null; }; - @Override protected InvokerResult getSearchResult(Execution execution) { + @Override protected InvokerResult getSearchResult() { return new InvokerResult(new Result(new Query())); } @Override protected void release() { } }); }; - @Override public FillInvoker createFillInvoker(VespaBackEndSearcher searcher, Result result) { + @Override public FillInvoker createFillInvoker(VespaBackend searcher, Result result) { return new FillInvoker() { @Override protected void getFillResults(Result result, String summaryClass) { fail(); } @Override protected void sendFillRequest(Result result, String summaryClass) { fail(); } @@ -288,11 +287,11 @@ public class DispatcherTest { // Start some searches, one against each group, since we have a round-robin policy. SearchInvoker search0 = dispatcher.getSearchInvoker(new Query(), null); - search0.search(new Query(), null); + search0.search(new Query()); // Unknown whether the first or second search hits node0, so we must track that. int offset = nodeIdOfSearcher0.get(); SearchInvoker search1 = dispatcher.getSearchInvoker(new Query(), null); - search1.search(new Query(), null); + search1.search(new Query()); // Wait for the current cluster monitor to be mid-ping-round. doPing.set(true); @@ -330,7 +329,7 @@ public class DispatcherTest { // Next search should hit group0 again, this time on node2. SearchInvoker search2 = dispatcher.getSearchInvoker(new Query(), null); - search2.search(new Query(), null); + search2.search(new Query()); // Searches against nodes 1 and 2 complete. (offset == 0 ? search0 : search1).close(); @@ -370,7 +369,7 @@ public class DispatcherTest { } @Override - public Optional<SearchInvoker> createSearchInvoker(VespaBackEndSearcher searcher, + public Optional<SearchInvoker> createSearchInvoker(VespaBackend searcher, Query query, List<Node> nodes, boolean acceptIncompleteCoverage, @@ -392,7 +391,7 @@ public class DispatcherTest { } @Override - protected Optional<SearchInvoker> createNodeSearchInvoker(VespaBackEndSearcher searcher, + protected Optional<SearchInvoker> createNodeSearchInvoker(VespaBackend searcher, Query query, int maxHitsPerNode, Node node) { @@ -401,7 +400,7 @@ public class DispatcherTest { } @Override - public FillInvoker createFillInvoker(VespaBackEndSearcher searcher, Result result) { + public FillInvoker createFillInvoker(VespaBackend searcher, Result result) { fail("Unexpected call to createFillInvoker"); return null; } |