Search in sources :

Example 1 with ServiceCreateResponse

use of com.spotify.docker.client.messages.ServiceCreateResponse in project pravega by pravega.

the class DockerBasedService method start.

public void start(final boolean wait, final ServiceSpec serviceSpec) {
    try {
        ServiceCreateResponse serviceCreateResponse = Exceptions.handleInterrupted(() -> dockerClient.createService(serviceSpec));
        if (wait) {
            Exceptions.handleInterrupted(() -> waitUntilServiceRunning().get(5, TimeUnit.MINUTES));
        }
        assertNotNull(serviceCreateResponse.id());
    } catch (Exception e) {
        throw new TestFrameworkException(TestFrameworkException.Type.RequestFailed, "Unable to create service", e);
    }
}
Also used : TestFrameworkException(io.pravega.test.system.framework.TestFrameworkException) ServiceCreateResponse(com.spotify.docker.client.messages.ServiceCreateResponse) TestFrameworkException(io.pravega.test.system.framework.TestFrameworkException) DockerException(com.spotify.docker.client.exceptions.DockerException)

Aggregations

DockerException (com.spotify.docker.client.exceptions.DockerException)1 ServiceCreateResponse (com.spotify.docker.client.messages.ServiceCreateResponse)1 TestFrameworkException (io.pravega.test.system.framework.TestFrameworkException)1