use of com.yahoo.vespa.model.search.SearchNode in project vespa by vespa-engine.
the class IndexedSearchNodeNamingTest method requireThatMultipleNodesAreNamedAfterDistributionKey.
@Test
public void requireThatMultipleNodesAreNamedAfterDistributionKey() throws Exception {
ContentCluster cluster = getMultiNodeCluster();
List<SearchNode> nodes = cluster.getSearch().getSearchNodes();
assertEquals(3, nodes.size());
assertSearchNode("n5", "5", nodes.get(0));
assertSearchNode("n3", "3", nodes.get(1));
assertSearchNode("n7", "7", nodes.get(2));
}
use of com.yahoo.vespa.model.search.SearchNode in project vespa by vespa-engine.
the class IndexedSearchNodeNamingTest method requireThatSingleNodeIsNamedAfterDistributionKey.
@Test
public void requireThatSingleNodeIsNamedAfterDistributionKey() throws Exception {
ContentCluster cluster = getSingleNodeCluster();
List<SearchNode> nodes = cluster.getSearch().getSearchNodes();
assertSearchNode("n3", "3", nodes.get(0));
}
use of com.yahoo.vespa.model.search.SearchNode in project vespa by vespa-engine.
the class IndexedHierarchicDistributionTest method requireThatSearchNodesAreCorrectWithTwoGroups.
@Test
public void requireThatSearchNodesAreCorrectWithTwoGroups() throws Exception {
ContentCluster c = getTwoGroupsCluster();
List<SearchNode> searchNodes = c.getSearch().getSearchNodes();
assertEquals(6, searchNodes.size());
assertSearchNode(0, 0, 0, searchNodes.get(0));
assertSearchNode(0, 1, 1, searchNodes.get(1));
assertSearchNode(0, 2, 2, searchNodes.get(2));
assertSearchNode(1, 0, 3, searchNodes.get(3));
assertSearchNode(1, 1, 4, searchNodes.get(4));
assertSearchNode(1, 2, 5, searchNodes.get(5));
}
use of com.yahoo.vespa.model.search.SearchNode in project vespa by vespa-engine.
the class IndexedSearchNodeNamingTest method requireThatNodesInHierarchicGroupsAreNamedAfterDistributionKey.
@Test
public void requireThatNodesInHierarchicGroupsAreNamedAfterDistributionKey() throws Exception {
ContentCluster cluster = getMultiGroupCluster();
List<SearchNode> nodes = cluster.getSearch().getSearchNodes();
assertEquals(4, nodes.size());
assertSearchNode("n7", "7", nodes.get(0));
assertSearchNode("n11", "11", nodes.get(1));
assertSearchNode("n17", "17", nodes.get(2));
assertSearchNode("n13", "13", nodes.get(3));
}
use of com.yahoo.vespa.model.search.SearchNode in project vespa by vespa-engine.
the class IndexedHierarchicDistributionTest method requireThatSearchNodesAreCorrectWithOneGroup.
@Test
public void requireThatSearchNodesAreCorrectWithOneGroup() throws Exception {
ContentCluster c = getOneGroupCluster();
List<SearchNode> searchNodes = c.getSearch().getSearchNodes();
assertEquals(3, searchNodes.size());
assertSearchNode(0, 0, 0, searchNodes.get(0));
assertSearchNode(0, 1, 1, searchNodes.get(1));
assertSearchNode(0, 2, 2, searchNodes.get(2));
}
Aggregations