use of com.yahoo.vespa.applicationmodel.TenantId in project vespa by vespa-engine.
the class NodeGroupTest method testBasics.
@Test
public void testBasics() {
ApplicationInstance applicationInstance = new ApplicationInstance(new TenantId("tenant"), new ApplicationInstanceId("application-instance"), new HashSet<>());
HostName hostName1 = new HostName("host1");
HostName hostName2 = new HostName("host2");
HostName hostName3 = new HostName("host3");
NodeGroup nodeGroup = new NodeGroup(applicationInstance, hostName1, hostName3);
nodeGroup.addNode(hostName2);
// hostnames are sorted (for no good reason other than testability due to stability, readability)
assertEquals(Arrays.asList(hostName1, hostName2, hostName3), nodeGroup.getHostNames());
assertEquals("host1,host2,host3", nodeGroup.toCommaSeparatedString());
}
Aggregations