Search in sources :

Example 6 with ImageNotFoundException

use of com.spotify.docker.client.exceptions.ImageNotFoundException in project helios by spotify.

the class TaskMonitorTest method verifyImageMissingTrumpsFlappingState.

@Test
public void verifyImageMissingTrumpsFlappingState() throws Exception {
    when(flapController.isFlapping()).thenReturn(true);
    sut.failed(new ImageNotFoundException("foobar", "not found"), "container error");
    verify(statusUpdater).setThrottleState(IMAGE_MISSING);
    verify(statusUpdater).setState(FAILED);
    verify(statusUpdater).setContainerError("container error");
    verify(statusUpdater).update();
}
Also used : ImageNotFoundException(com.spotify.docker.client.exceptions.ImageNotFoundException) Test(org.junit.Test)

Aggregations

ImageNotFoundException (com.spotify.docker.client.exceptions.ImageNotFoundException)6 Test (org.junit.Test)4 DockerException (com.spotify.docker.client.exceptions.DockerException)3 DockerTimeoutException (com.spotify.docker.client.exceptions.DockerTimeoutException)2 ImagePullFailedException (com.spotify.docker.client.exceptions.ImagePullFailedException)2 ExecutionException (java.util.concurrent.ExecutionException)2 Stopwatch (com.google.common.base.Stopwatch)1 DefaultDockerClient (com.spotify.docker.client.DefaultDockerClient)1 DockerClient (com.spotify.docker.client.DockerClient)1 ContainerNotFoundException (com.spotify.docker.client.exceptions.ContainerNotFoundException)1 DockerRequestException (com.spotify.docker.client.exceptions.DockerRequestException)1 ContainerConfig (com.spotify.docker.client.messages.ContainerConfig)1 ContainerCreation (com.spotify.docker.client.messages.ContainerCreation)1 ContainerInfo (com.spotify.docker.client.messages.ContainerInfo)1 HostConfig (com.spotify.docker.client.messages.HostConfig)1 HeliosRuntimeException (com.spotify.helios.common.HeliosRuntimeException)1 IOException (java.io.IOException)1 Integer.toHexString (java.lang.Integer.toHexString)1 Socket (java.net.Socket)1 URI (java.net.URI)1