use of org.eclipse.che.api.workspace.shared.dto.WsAgentHealthStateDto in project che by eclipse.
the class WsAgentHealthCheckerTest method returnResultWithUnavailableStateIfDoNotGetResponseFromWsAgent.
@Test
public void returnResultWithUnavailableStateIfDoNotGetResponseFromWsAgent() throws Exception {
doThrow(IOException.class).when(httpJsonRequest).request();
final WsAgentHealthStateDto result = checker.check(devMachine);
verify(httpJsonRequest).request();
assertEquals(SERVICE_UNAVAILABLE.getStatusCode(), result.getCode());
}
use of org.eclipse.che.api.workspace.shared.dto.WsAgentHealthStateDto in project che by eclipse.
the class WsAgentHealthCheckerTest method pingRequestToWsAgentShouldBeSent.
@Test
public void pingRequestToWsAgentShouldBeSent() throws Exception {
final WsAgentHealthStateDto result = checker.check(devMachine);
verify(httpJsonRequest).request();
assertEquals(200, result.getCode());
}
Aggregations