aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-10-07 11:01:01 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2021-10-07 11:01:01 +0200
commit4c2f86281542b752785d75f2f5eb8000ea9abf0f (patch)
tree3e9275c5ddfb21e144270dffd77a820b778bbdde /container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
parentfd8cbfea9f246a466b1eb12618107782de424f6d (diff)
Execute a query over multiple document types in the same content cluster in parallel towards the backend.
Diffstat (limited to 'container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
index 38c231cb1bb..361c1ed9692 100644
--- a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
@@ -4,6 +4,7 @@ package com.yahoo.prelude.cluster;
import com.google.common.collect.ImmutableList;
import com.yahoo.component.ComponentId;
import com.yahoo.component.provider.ComponentRegistry;
+import com.yahoo.concurrent.InThreadExecutorService;
import com.yahoo.container.QrConfig;
import com.yahoo.container.QrSearchersConfig;
import com.yahoo.container.handler.ClustersStatus;
@@ -263,9 +264,10 @@ public class ClusterSearcherTestCase {
private Execution createExecution(List<String> docTypesList, boolean expectAttributePrefetch) {
Set<String> documentTypes = new LinkedHashSet<>(docTypesList);
- ClusterSearcher cluster = new ClusterSearcher(documentTypes);
+ ClusterSearcher cluster = new ClusterSearcher(documentTypes,
+ new MyMockSearcher(expectAttributePrefetch),
+ new InThreadExecutorService());
try {
- cluster.addBackendSearcher(new MyMockSearcher(expectAttributePrefetch));
cluster.setValidRankProfile("default", documentTypes);
cluster.addValidRankProfile("testprofile", "type1");
return new Execution(cluster, Execution.Context.createContextStub());
@@ -523,6 +525,7 @@ public class ClusterSearcherTestCase {
dispatchers.register(new ComponentId("dispatcher." + clusterName), dispatcher);
return new ClusterSearcher(new ComponentId("test-id"),
+ new InThreadExecutorService(),
qrSearchersConfig.build(),
clusterConfig.build(),
documentDbConfig.build(),