fixup! chore: remove che.infra.kubernetes.workspace_start_timeout_min property
parent
687df1a19d
commit
e8ae835df2
|
|
@ -471,25 +471,7 @@ public class KubernetesInternalRuntime<E extends KubernetesEnvironment>
|
|||
@Override
|
||||
protected void internalStop(Map<String, String> stopOptions) throws InfrastructureException {
|
||||
RuntimeIdentity identity = getContext().getIdentity();
|
||||
|
||||
TracingTags.WORKSPACE_ID.set(identity.getWorkspaceId());
|
||||
|
||||
runtimeHangingDetector.stopTracking(getContext().getIdentity());
|
||||
if (startSynchronizer.interrupt()) {
|
||||
// runtime is STARTING. Need to wait until start will be interrupted properly
|
||||
|
||||
// Runtime is not interrupted yet. It may occur when start was performing by another
|
||||
// Che Server that is crashed so start is hung up in STOPPING phase.
|
||||
// Need to clean up runtime resources
|
||||
probeScheduler.cancel(identity.getWorkspaceId());
|
||||
runtimeCleaner.cleanUp(namespace, identity.getWorkspaceId());
|
||||
|
||||
} else {
|
||||
// runtime is RUNNING. Clean up used resources
|
||||
// Cancels workspace servers probes if any
|
||||
probeScheduler.cancel(identity.getWorkspaceId());
|
||||
runtimeCleaner.cleanUp(namespace, identity.getWorkspaceId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import static org.mockito.Mockito.atLeastOnce;
|
|||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.doNothing;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.doThrow;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.spy;
|
||||
|
|
@ -72,7 +71,6 @@ import java.util.ArrayList;
|
|||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
|
@ -503,23 +501,6 @@ public class KubernetesInternalRuntimeTest {
|
|||
assertEquals(provisionedCommand.getType(), provisionedCommand.getType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void stopsKubernetesEnvironment() throws Exception {
|
||||
doNothing().when(namespace).cleanUp();
|
||||
|
||||
internalRuntime.internalStop(emptyMap());
|
||||
|
||||
verify(runtimeHangingDetector).stopTracking(IDENTITY);
|
||||
verify(runtimeCleaner).cleanUp(namespace, WORKSPACE_ID);
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = InfrastructureException.class)
|
||||
public void throwsInfrastructureExceptionWhenKubernetesNamespaceCleanupFailed() throws Exception {
|
||||
doThrow(InfrastructureException.class).when(runtimeCleaner).cleanUp(namespace, WORKSPACE_ID);
|
||||
|
||||
internalRuntime.internalStop(emptyMap());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRepublishContainerOutputAsMachineLogEvents() throws Exception {
|
||||
final MachineLogsPublisher logsPublisher =
|
||||
|
|
@ -568,15 +549,6 @@ public class KubernetesInternalRuntimeTest {
|
|||
verify(eventService, never()).publish(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cancelsWsProbesOnRuntimeStop() throws Exception {
|
||||
doNothing().when(namespace).cleanUp();
|
||||
|
||||
internalRuntime.internalStop(emptyMap());
|
||||
|
||||
verify(probesScheduler).cancel(WORKSPACE_ID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldMarkRuntimeStarting() throws Exception {
|
||||
// when
|
||||
|
|
|
|||
Loading…
Reference in New Issue