aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/dispatch
diff options
context:
space:
mode:
authorOlli Virtanen <olli.virtanen@oath.com>2019-04-02 11:47:20 +0200
committerOlli Virtanen <olli.virtanen@oath.com>2019-04-02 11:47:20 +0200
commit0537fc5024145cf383f9c76039cd26d739df8462 (patch)
treec96ef31e79cdf38966b0850ec6ad0a2ca00e238b /container-search/src/test/java/com/yahoo/search/dispatch
parente680e17b11b01ef67b96957fe852e3de5cbc050b (diff)
Use sort data with java dispatcher
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/dispatch')
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java18
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/MockInvoker.java3
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/rpc/RpcSearchInvokerTest.java5
3 files changed, 12 insertions, 14 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
index f84f35020d2..8686ddf229b 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
@@ -49,7 +49,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(4900, 100, 1));
expectedEvents.add(new Event(4800, 100, 2));
- invoker.search(query, null, null);
+ invoker.search(query, null);
assertTrue("All test scenario events processed", expectedEvents.isEmpty());
}
@@ -63,7 +63,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(4700, 300, 1));
expectedEvents.add(null);
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
assertTrue("All test scenario events processed", expectedEvents.isEmpty());
assertNull("Result is not marked as an error", result.hits().getErrorHit());
@@ -82,7 +82,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(2400, 100, 2));
expectedEvents.add(new Event(0, 0, null));
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
assertTrue("All test scenario events processed", expectedEvents.isEmpty());
assertNull("Result is not marked as an error", result.hits().getErrorHit());
@@ -101,7 +101,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(null, 100, 0));
expectedEvents.add(new Event(null, 200, 1));
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
Coverage cov = result.getCoverage(true);
assertThat(cov.getDocs(), is(100000L));
@@ -122,7 +122,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(null, 100, 0));
expectedEvents.add(new Event(null, 200, 1));
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
Coverage cov = result.getCoverage(true);
assertThat(cov.getDocs(), is(23420L));
@@ -144,7 +144,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(null, 100, 0));
expectedEvents.add(new Event(null, 200, 1));
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
Coverage cov = result.getCoverage(true);
assertThat(cov.getDocs(), is(9900L));
@@ -166,7 +166,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(null, 100, 0));
expectedEvents.add(null);
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
Coverage cov = result.getCoverage(true);
assertThat(cov.getDocs(), is(50155L));
@@ -191,7 +191,7 @@ public class InterleavedSearchInvokerTest {
expectedEvents.add(new Event(null, 1, 1));
expectedEvents.add(new Event(null, 100, 0));
- Result result = invoker.search(query, null, null);
+ Result result = invoker.search(query, null);
Coverage cov = result.getCoverage(true);
assertThat(cov.getDocs(), is(50155L));
@@ -209,7 +209,7 @@ public class InterleavedSearchInvokerTest {
invokers.add(new MockInvoker(i));
}
- return new InterleavedSearchInvoker(invokers, null, searchCluster, null) {
+ return new InterleavedSearchInvoker(invokers, searchCluster, null) {
@Override
protected long currentTime() {
return clock.millis();
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/MockInvoker.java b/container-search/src/test/java/com/yahoo/search/dispatch/MockInvoker.java
index 00b1edec8b3..e347a884c17 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/MockInvoker.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/MockInvoker.java
@@ -1,7 +1,6 @@
// Copyright 2019 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.dispatch;
-import com.yahoo.fs4.QueryPacket;
import com.yahoo.search.Query;
import com.yahoo.search.Result;
import com.yahoo.search.dispatch.searchcluster.Node;
@@ -25,7 +24,7 @@ class MockInvoker extends SearchInvoker {
}
@Override
- protected void sendSearchRequest(Query query, QueryPacket queryPacket) throws IOException {
+ protected void sendSearchRequest(Query query) throws IOException {
this.query = query;
}
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/rpc/RpcSearchInvokerTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/rpc/RpcSearchInvokerTest.java
index b9d894f9eb5..64863b9a8a6 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/rpc/RpcSearchInvokerTest.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/rpc/RpcSearchInvokerTest.java
@@ -5,7 +5,6 @@ package com.yahoo.search.dispatch.rpc;
import ai.vespa.searchlib.searchprotocol.protobuf.SearchProtocol;
import com.google.common.collect.ImmutableMap;
import com.yahoo.compress.CompressionType;
-import com.yahoo.fs4.QueryPacket;
import com.yahoo.prelude.fastsearch.FastHit;
import com.yahoo.prelude.fastsearch.VespaBackEndSearcher;
import com.yahoo.search.Query;
@@ -40,7 +39,7 @@ public class RpcSearchInvokerTest {
var invoker = new RpcSearchInvoker(mockSearcher(), new Node(7, "seven", 77, 1), mockPool);
Query q = new Query("search/?query=test&hits=10&offset=3");
- invoker.sendSearchRequest(q, null);
+ invoker.sendSearchRequest(q);
var bytes = mockPool.compressor().decompress(payloadHolder.get(), compressionTypeHolder.get(), lengthHolder.get());
var request = SearchProtocol.SearchRequest.newBuilder().mergeFrom(bytes).build();
@@ -78,7 +77,7 @@ public class RpcSearchInvokerTest {
private VespaBackEndSearcher mockSearcher() {
return new VespaBackEndSearcher() {
@Override
- protected Result doSearch2(Query query, QueryPacket queryPacket, Execution execution) {
+ protected Result doSearch2(Query query, Execution execution) {
fail("Unexpected call");
return null;
}