diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-24 00:00:19 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-24 00:00:19 +0100 |
commit | 90b260e83678edc36eb877ec235e0e6ce5892a48 (patch) | |
tree | 081a1ebe9316553bcbbf3d568f245d702b72bd55 /container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java | |
parent | ba11a8a87877dd3a97586255839b02782b70de87 (diff) |
Cleanup the concept of orderedGroups. Just use a single way of accessing the groups.
Simplify testing by introducing a GroupList to contain all acces to groups and nodes.
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java index 12cbe488485..fcd587e19f7 100644 --- a/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java +++ b/container-search/src/test/java/com/yahoo/search/dispatch/SearchPathTest.java @@ -2,6 +2,8 @@ package com.yahoo.search.dispatch; import com.yahoo.search.dispatch.SearchPath.InvalidSearchPathException; +import com.yahoo.search.dispatch.searchcluster.GroupList; +import com.yahoo.search.dispatch.searchcluster.GroupListImpl; import com.yahoo.search.dispatch.searchcluster.Node; import org.junit.jupiter.api.Test; @@ -81,7 +83,7 @@ public class SearchPathTest { } } - private void verifyRandomGroup(MockSearchCluster cluster, String searchPath, Set<?> possibleSolutions) { + private void verifyRandomGroup(GroupList cluster, String searchPath, Set<?> possibleSolutions) { for (int i=0; i < 100; i++) { String nodes = distKeysAsString(SearchPath.selectNodes(searchPath, cluster)); assertTrue(possibleSolutions.contains(nodes)); @@ -90,7 +92,7 @@ public class SearchPathTest { @Test void searchPathMustFilterNodesBasedOnDefinition() { - MockSearchCluster cluster = new MockSearchCluster("a", 3, 3); + GroupList cluster = GroupListImpl.buildGroupListForTest(3, 3); assertEquals(distKeysAsString(SearchPath.selectNodes("1/1", cluster)), "4"); assertEquals(distKeysAsString(SearchPath.selectNodes("/1", cluster)), "3,4,5"); |