aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/dispatch
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-12 08:30:35 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-12 08:39:04 +0200
commit76a89b62274060452022ddf24a7685ee2f380cb4 (patch)
treeef924603de22efd026f519ab31fd8f5a6ff60f2f /container-search/src/test/java/com/yahoo/search/dispatch
parent7e7ebf7b527be1f163d497a41898e2252d878fe7 (diff)
Replace all usages of Arrays.asList with List.of where possible.
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.java9
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java3
2 files changed, 5 insertions, 7 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 c59dbc3421e..152056dfb72 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
@@ -28,7 +28,6 @@ import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
@@ -203,10 +202,10 @@ public class InterleavedSearchInvokerTest {
}
private static final double DELTA = 0.000000000001;
- private static final List<Double> A5 = Arrays.asList(11.0,8.5,7.5,3.0,2.0);
- private static final List<Double> B5 = Arrays.asList(9.0,8.0,7.0,6.0,1.0);
- private static final List<Double> A5Aux = Arrays.asList(-1.0,11.0,8.5,7.5,-7.0,3.0,2.0);
- private static final List<Double> B5Aux = Arrays.asList(9.0,8.0,-3.0,7.0,6.0,1.0, -1.0);
+ private static final List<Double> A5 = List.of(11.0,8.5,7.5,3.0,2.0);
+ private static final List<Double> B5 = List.of(9.0,8.0,7.0,6.0,1.0);
+ private static final List<Double> A5Aux = List.of(-1.0,11.0,8.5,7.5,-7.0,3.0,2.0);
+ private static final List<Double> B5Aux = List.of(9.0,8.0,-3.0,7.0,6.0,1.0, -1.0);
private void validateThatTopKProbabilityOverrideTakesEffect(Double topKProbability, int expectedK, Group group) throws IOException {
try (InterleavedSearchInvoker invoker = createInterLeavedTestInvoker(A5, B5, group)) {
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
index 5223eb0b06b..1b36c2b8151 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
@@ -12,7 +12,6 @@ import com.yahoo.search.result.ErrorMessage;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -46,7 +45,7 @@ public class SearchClusterTest {
List<AtomicInteger> pingCounts;
State(String clusterId, int nodesPergroup, String ... nodeNames) {
- this(clusterId, nodesPergroup, Arrays.asList(nodeNames));
+ this(clusterId, nodesPergroup, List.of(nodeNames));
}
State(String clusterId, int nodesPerGroup, List<String> nodeNames) {