Search in sources :

Example 46 with HostName

use of com.yahoo.vespa.applicationmodel.HostName in project vespa by vespa-engine.

the class OrchestratorImplTest method suspendAllWorks.

@Test
public void suspendAllWorks() throws Exception {
    // A spy is preferential because suspendAll() relies on delegating the hard work to suspend() and resume().
    OrchestratorImpl orchestrator = spy(this.orchestrator);
    orchestrator.suspendAll(new HostName("parentHostname"), Arrays.asList(DummyInstanceLookupService.TEST1_HOST_NAME, DummyInstanceLookupService.TEST3_HOST_NAME, DummyInstanceLookupService.TEST6_HOST_NAME));
    // As of 2016-06-07 the order of the node groups are as follows:
    // TEST3: mediasearch:imagesearch:default
    // TEST6: tenant-id-3:application-instance-3:default
    // TEST1: test-tenant-id:application:instance
    InOrder order = inOrder(orchestrator);
    order.verify(orchestrator).suspendGroup(DummyInstanceLookupService.TEST3_NODE_GROUP);
    order.verify(orchestrator).suspendGroup(DummyInstanceLookupService.TEST6_NODE_GROUP);
    order.verify(orchestrator).suspendGroup(DummyInstanceLookupService.TEST1_NODE_GROUP);
    order.verifyNoMoreInteractions();
}
Also used : InOrder(org.mockito.InOrder) HostName(com.yahoo.vespa.applicationmodel.HostName) Test(org.junit.Test)

Aggregations

HostName (com.yahoo.vespa.applicationmodel.HostName)46 Test (org.junit.Test)20 ApplicationInstance (com.yahoo.vespa.applicationmodel.ApplicationInstance)14 ServiceType (com.yahoo.vespa.applicationmodel.ServiceType)13 ServiceCluster (com.yahoo.vespa.applicationmodel.ServiceCluster)9 ServiceInstance (com.yahoo.vespa.applicationmodel.ServiceInstance)9 ClusterId (com.yahoo.vespa.applicationmodel.ClusterId)8 HostStatus (com.yahoo.vespa.orchestrator.status.HostStatus)8 List (java.util.List)8 ApplicationId (com.yahoo.config.provision.ApplicationId)7 ApplicationInstanceReference (com.yahoo.vespa.applicationmodel.ApplicationInstanceReference)7 Orchestrator (com.yahoo.vespa.orchestrator.Orchestrator)7 Collectors (java.util.stream.Collectors)7 ApplicationInstanceId (com.yahoo.vespa.applicationmodel.ApplicationInstanceId)6 ConfigId (com.yahoo.vespa.applicationmodel.ConfigId)6 TenantId (com.yahoo.vespa.applicationmodel.TenantId)6 ServiceStatus (com.yahoo.vespa.applicationmodel.ServiceStatus)5 OrchestrationException (com.yahoo.vespa.orchestrator.OrchestrationException)5 StorageNode (com.yahoo.vespa.orchestrator.model.StorageNode)5 IOException (java.io.IOException)5