summaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-12-19 09:36:01 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-12-19 09:36:01 +0000
commit613c2a8aa1d14347ae3bdaf9efe92633b5077fa9 (patch)
tree2206821e80860df9d9f9171d946264a98f0fe782 /container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
parented9bf1ee31f28295fc920984e0e0cbf492d49e65 (diff)
Avoid deprecation warnings
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.java19
1 files changed, 10 insertions, 9 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 6970093fc9d..5b6a4b68930 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
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.cluster;
+import com.google.common.collect.ImmutableList;
import com.yahoo.cloud.config.ClusterInfoConfig;
import com.yahoo.component.ComponentId;
import com.yahoo.component.provider.ComponentRegistry;
@@ -28,6 +29,7 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
@@ -69,15 +71,14 @@ public class ClusterSearcherTestCase {
clusters.put("cluster1", Arrays.asList("type1", "type2", "type3"));
clusters.put("cluster2", Arrays.asList("type4", "type5"));
clusters.put("type1", Arrays.asList("type6"));
- Map<String, SearchDefinition> searchDefs = new LinkedHashMap<>();
- searchDefs.put("type1", new SearchDefinition("type1"));
- searchDefs.put("type2", new SearchDefinition("type2"));
- searchDefs.put("type3", new SearchDefinition("type3"));
- searchDefs.put("type4", new SearchDefinition("type4"));
- searchDefs.put("type5", new SearchDefinition("type5"));
- searchDefs.put("type6", new SearchDefinition("type6"));
- SearchDefinition union = new SearchDefinition("union");
- return new IndexFacts(new IndexModel(clusters, searchDefs, union));
+ Collection<SearchDefinition> searchDefs = ImmutableList.of(
+ new SearchDefinition("type1"),
+ new SearchDefinition("type2"),
+ new SearchDefinition("type3"),
+ new SearchDefinition("type4"),
+ new SearchDefinition("type5"),
+ new SearchDefinition("type6"));
+ return new IndexFacts(new IndexModel(clusters, searchDefs));
}
private Set<String> resolve(ClusterSearcher searcher, String query) {