InternalRuntime { @Traced public void start(Map<String, String> startOptions) throws InfrastructureException { TracingTags.WORKSPACE_ID.set(getContext().getIdentity()::getWorkspaceId); markStarting(); try { internalStart(startOptions); markRunning(); } catch (InfrastructureException e) { markStopped(); throw e; } } InternalRuntime(T context, URLRewriter urlRewriter);  InternalRuntime(T context, URLRewriter urlRewriter, @Nullable WorkspaceStatus status); @Nullable String getActiveEnv(); String getOwner(); List<? extends Warning> getWarnings(); Map<String, ? extends Machine> getMachines(); abstract List<? extends Command> getCommands(); WorkspaceStatus getStatus(); @Traced void start(Map<String, String> startOptions); void stop(Map<String, String> stopOptions); abstract Map<String, String> getProperties(); T getContext(); static final int MALFORMED_SERVER_URL_FOUND; }
@Test( expectedExceptions = StateException.class, expectedExceptionsMessageRegExp = RUNTIME_STARTED_EXC_MESSAGE) public void shouldNotStartRunningRuntime() throws Exception { setRunningRuntime(); internalRuntime.start(emptyMap()); }
@Test( timeOut = SECOND_IN_MILLISECONDS, expectedExceptions = StateException.class, expectedExceptionsMessageRegExp = RUNTIME_STARTED_EXC_MESSAGE) public void shouldNotStartStartingRuntime() throws Exception { setStartingRuntime(); internalRuntime.start(emptyMap()); }
@Test( timeOut = SECOND_IN_MILLISECONDS, expectedExceptions = StateException.class, expectedExceptionsMessageRegExp = RUNTIME_STARTED_EXC_MESSAGE) public void shouldNotStartStoppingRuntime() throws Exception { setStoppingRuntime(); internalRuntime.start(emptyMap()); }