use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.
the class VespaModelUtilTest method testGetStorageNodeIndex.
@Test
public void testGetStorageNodeIndex() {
ConfigId configId = TestUtil.storageNodeConfigId(CONTENT_CLUSTER_ID.toString(), 3);
assertThat(VespaModelUtil.getStorageNodeIndex(configId)).isEqualTo(3);
}
use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.
the class VespaModelUtilTest method testBadClusterControllerConfigId.
@Test(expected = IllegalArgumentException.class)
public void testBadClusterControllerConfigId() {
ConfigId configId = new ConfigId("fantasy_sports/storage/9");
VespaModelUtil.getClusterControllerIndex(configId);
fail();
}
use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.
the class VespaModelUtilTest method testGetClusterControllerIndexWithStandaloneClusterController.
@Test
public void testGetClusterControllerIndexWithStandaloneClusterController() {
ConfigId configId = new ConfigId("fantasy_sports/standalone/fantasy_sports-controllers/1");
assertThat(VespaModelUtil.getClusterControllerIndex(configId)).isEqualTo(1);
}
Aggregations