@Test public void testWaitForWhenNoInstances() { ReflectionTestUtils.setField(underTest, "pollingInterval", 1); ReflectionTestUtils.setField(underTest, "pollingAttempt", 1); CloudContext cloudContext = new CloudContext(STACK_ID, "", "", "", ""); CloudCredential cloudCredential = new CloudCredential(STACK_ID.toString(), ""); AuthenticatedContext ac = new AuthenticatedContext(cloudContext, cloudCredential); List<CloudVmInstanceStatus> actual = underTest.waitFor(ac, Collections.emptyList(), Collections.emptySet()); Assert.assertEquals(0, actual.size()); }
public List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances, Set<InstanceStatus> completedStatuses) { return Polling.stopAfterAttempt(pollingAttempt) .waitPeriodly(pollingInterval, TimeUnit.SECONDS) .stopIfException(true) .run(process(authenticatedContext, instances, completedStatuses)); }
PollerUtil { public List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances, Set<InstanceStatus> completedStatuses) { return Polling.stopAfterAttempt(pollingAttempt) .waitPeriodly(pollingInterval, TimeUnit.SECONDS) .stopIfException(true) .run(process(authenticatedContext, instances, completedStatuses)); } }
PollerUtil { public List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances, Set<InstanceStatus> completedStatuses) { return Polling.stopAfterAttempt(pollingAttempt) .waitPeriodly(pollingInterval, TimeUnit.SECONDS) .stopIfException(true) .run(process(authenticatedContext, instances, completedStatuses)); }  }
PollerUtil { public List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances, Set<InstanceStatus> completedStatuses) { return Polling.stopAfterAttempt(pollingAttempt) .waitPeriodly(pollingInterval, TimeUnit.SECONDS) .stopIfException(true) .run(process(authenticatedContext, instances, completedStatuses)); }  List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances,
            Set<InstanceStatus> completedStatuses); }
PollerUtil { public List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances, Set<InstanceStatus> completedStatuses) { return Polling.stopAfterAttempt(pollingAttempt) .waitPeriodly(pollingInterval, TimeUnit.SECONDS) .stopIfException(true) .run(process(authenticatedContext, instances, completedStatuses)); }  List<CloudVmInstanceStatus> waitFor(AuthenticatedContext authenticatedContext, List<CloudInstance> instances,
            Set<InstanceStatus> completedStatuses);  }