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:19:38 +0200
committerGitHub <noreply@github.com>2021-10-07 11:19:38 +0200
commit5f96fad42a48c72aab4270b11c7ddda07a7851b0 (patch)
treeb53797c23e01d49fbd834a62d7d8acd657878e9a /container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
parentdd1f85033c5c28360e46fadebbd5eeac3855e2d2 (diff)
parent4c2f86281542b752785d75f2f5eb8000ea9abf0f (diff)
Merge pull request #19451 from vespa-engine/balder/execute-queries-to-multiple-documenttypes-in-same-cluster-in-parallel
Execute a query over multiple document types in the same content clus…
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 bf642310148..95929763675 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(),