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();
}
Aggregations