summaryrefslogtreecommitdiffstats
path: root/container-search/src/test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-03-11 15:51:38 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-03-11 15:51:38 +0100
commit354136dc94d1963384573d2f2728f1fb408f3d9a (patch)
tree407d5159ce0398464eb8b9302705fc84a7ed948a /container-search/src/test
parentd51144a9aa9be319acb1a0b3677a403b8f5fc358 (diff)
Rename FastBackend => Indexedbackend, and move some tests into the package they test.
Diffstat (limited to 'container-search/src/test')
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/fastsearch/DocsumDefinitionTestCase.java (renamed from container-search/src/test/java/com/yahoo/prelude/fastsearch/test/DocsumDefinitionTestCase.java)10
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/fastsearch/IndexedBackendTestCase.java (renamed from container-search/src/test/java/com/yahoo/prelude/fastsearch/test/FastSearcherTestCase.java)21
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/fastsearch/PartialFillTestCase.java (renamed from container-search/src/test/java/com/yahoo/prelude/fastsearch/test/PartialFillTestCase.java)12
3 files changed, 10 insertions, 33 deletions
diff --git a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/DocsumDefinitionTestCase.java b/container-search/src/test/java/com/yahoo/prelude/fastsearch/DocsumDefinitionTestCase.java
index ade094115fe..ba9988b865c 100644
--- a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/DocsumDefinitionTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/fastsearch/DocsumDefinitionTestCase.java
@@ -1,14 +1,6 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.prelude.fastsearch.test;
+package com.yahoo.prelude.fastsearch;
-import com.yahoo.prelude.fastsearch.ByteField;
-import com.yahoo.prelude.fastsearch.DataField;
-import com.yahoo.prelude.fastsearch.DocsumDefinition;
-import com.yahoo.prelude.fastsearch.DocsumDefinitionSet;
-import com.yahoo.prelude.fastsearch.FastHit;
-import com.yahoo.prelude.fastsearch.IntegerField;
-import com.yahoo.prelude.fastsearch.StringField;
-import com.yahoo.document.DocumentId;
import com.yahoo.document.GlobalId;
import com.yahoo.search.schema.DocumentSummary;
import com.yahoo.search.schema.Schema;
diff --git a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/FastSearcherTestCase.java b/container-search/src/test/java/com/yahoo/prelude/fastsearch/IndexedBackendTestCase.java
index 3928743c954..917206bf00c 100644
--- a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/FastSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/fastsearch/IndexedBackendTestCase.java
@@ -1,14 +1,9 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.prelude.fastsearch.test;
+package com.yahoo.prelude.fastsearch;
import com.yahoo.container.QrSearchersConfig;
import com.yahoo.container.handler.VipStatus;
import com.yahoo.container.protect.Error;
-import com.yahoo.prelude.fastsearch.ClusterParams;
-import com.yahoo.prelude.fastsearch.DocumentdbInfoConfig;
-import com.yahoo.prelude.fastsearch.FastBackend;
-import com.yahoo.prelude.fastsearch.SummaryParameters;
-import com.yahoo.prelude.fastsearch.VespaBackend;
import com.yahoo.search.Query;
import com.yahoo.search.Result;
import com.yahoo.search.dispatch.MockDispatcher;
@@ -38,14 +33,14 @@ import static org.junit.jupiter.api.Assertions.*;
*
* @author bratseth
*/
-public class FastSearcherTestCase {
+public class IndexedBackendTestCase {
private static final String SCHEMA = "test";
private static final String CLUSTER = "test";
@Test
void testNullQuery() {
- Logger.getLogger(FastBackend.class.getName()).setLevel(Level.ALL);
- FastBackend fastSearcher = new FastBackend("container.0",
+ Logger.getLogger(IndexedBackend.class.getName()).setLevel(Level.ALL);
+ IndexedBackend fastSearcher = new IndexedBackend("container.0",
MockDispatcher.create(List.of()),
new SummaryParameters(null),
new ClusterParams("testhittype"),
@@ -70,7 +65,7 @@ public class FastSearcherTestCase {
@Test
void testSinglePassGroupingIsForcedWithSingleNodeGroups() {
- FastBackend fastSearcher = new FastBackend("container.0",
+ IndexedBackend fastSearcher = new IndexedBackend("container.0",
MockDispatcher.create(List.of(new Node(CLUSTER, 0, "host0", 0))),
new SummaryParameters(null),
new ClusterParams("testhittype"),
@@ -93,7 +88,7 @@ public class FastSearcherTestCase {
@Test
void testRankProfileValidation() {
- FastBackend fastSearcher = new FastBackend("container.0",
+ IndexedBackend fastSearcher = new IndexedBackend("container.0",
MockDispatcher.create(List.of(new Node(CLUSTER, 0, "host0", 0))),
new SummaryParameters(null),
new ClusterParams("testhittype"),
@@ -112,7 +107,7 @@ public class FastSearcherTestCase {
.add(new RankProfile.Builder("default").setHasRankFeatures(false)
.setHasSummaryFeatures(false)
.build());
- FastBackend backend = new FastBackend("container.0",
+ IndexedBackend backend = new IndexedBackend("container.0",
MockDispatcher.create(Collections.singletonList(new Node(CLUSTER, 0, "host0", 0))),
new SummaryParameters(null),
new ClusterParams("testhittype"),
@@ -132,7 +127,7 @@ public class FastSearcherTestCase {
void testSinglePassGroupingIsNotForcedWithSingleNodeGroups() {
MockDispatcher dispatcher = MockDispatcher.create(List.of(new Node(CLUSTER, 0, "host0", 0), new Node(CLUSTER, 2, "host1", 0)));
- FastBackend fastSearcher = new FastBackend("container.0",
+ IndexedBackend fastSearcher = new IndexedBackend("container.0",
dispatcher,
new SummaryParameters(null),
new ClusterParams("testhittype"),
diff --git a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/PartialFillTestCase.java b/container-search/src/test/java/com/yahoo/prelude/fastsearch/PartialFillTestCase.java
index cf5a0ca7bd9..7760e204d4b 100644
--- a/container-search/src/test/java/com/yahoo/prelude/fastsearch/test/PartialFillTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/fastsearch/PartialFillTestCase.java
@@ -1,12 +1,8 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.prelude.fastsearch.test;
+package com.yahoo.prelude.fastsearch;
-import com.yahoo.component.chain.Chain;
-import com.yahoo.prelude.fastsearch.FastHit;
-import com.yahoo.prelude.fastsearch.VespaBackend;
import com.yahoo.search.Query;
import com.yahoo.search.Result;
-import com.yahoo.search.Searcher;
import com.yahoo.search.result.ErrorHit;
import com.yahoo.search.result.ErrorMessage;
import org.junit.jupiter.api.Test;
@@ -141,10 +137,4 @@ public class PartialFillTestCase {
searcher.fill(result, summaryClass);
}
- private Chain<Searcher> chainedAsSearchChain(Searcher topOfChain) {
- List<Searcher> searchers = new ArrayList<>();
- searchers.add(topOfChain);
- return new Chain<>(searchers);
- }
-
}