Search in sources :

Example 6 with EnvironmentStartInterruptedException

use of org.eclipse.che.api.environment.server.exception.EnvironmentStartInterruptedException in project che by eclipse.

the class WorkspaceRuntimesTest method cancelsWorkspaceStartIfEnvironmentStartIsInterrupted.

@Test
public void cancelsWorkspaceStartIfEnvironmentStartIsInterrupted() throws Exception {
    WorkspaceImpl workspace = newWorkspace("workspace", "env-name");
    rejectEnvironmentStart(workspace, "env-name", new EnvironmentStartInterruptedException(workspace.getId(), "env-name"));
    CompletableFuture<WorkspaceRuntimeImpl> cmpFuture = runtimes.startAsync(workspace, "env-name", false);
    captureAndVerifyRuntimeStateAfterInterruption(workspace, cmpFuture);
}
Also used : WorkspaceImpl(org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl) EnvironmentStartInterruptedException(org.eclipse.che.api.environment.server.exception.EnvironmentStartInterruptedException) WorkspaceRuntimeImpl(org.eclipse.che.api.workspace.server.model.impl.WorkspaceRuntimeImpl) Test(org.testng.annotations.Test)

Aggregations

EnvironmentStartInterruptedException (org.eclipse.che.api.environment.server.exception.EnvironmentStartInterruptedException)6 ServerException (org.eclipse.che.api.core.ServerException)4 ConflictException (org.eclipse.che.api.core.ConflictException)3 EnvironmentNotRunningException (org.eclipse.che.api.environment.server.exception.EnvironmentNotRunningException)3 Unlocker (org.eclipse.che.commons.lang.concurrent.Unlocker)3 ArrayList (java.util.ArrayList)2 AgentException (org.eclipse.che.api.agent.server.exception.AgentException)2 NotFoundException (org.eclipse.che.api.core.NotFoundException)2 LineConsumer (org.eclipse.che.api.core.util.LineConsumer)2 EnvironmentException (org.eclipse.che.api.environment.server.exception.EnvironmentException)2 CheServiceImpl (org.eclipse.che.api.environment.server.model.CheServiceImpl)2 CheServicesEnvironmentImpl (org.eclipse.che.api.environment.server.model.CheServicesEnvironmentImpl)2 MachineException (org.eclipse.che.api.machine.server.exception.MachineException)2 Instance (org.eclipse.che.api.machine.server.spi.Instance)2 EnvironmentImpl (org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl)2 Test (org.testng.annotations.Test)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 File (java.io.File)1 IOException (java.io.IOException)1 String.format (java.lang.String.format)1