@Test public void testAggregatedHCResponseDown() { Response mockResponse = mock(Response.class); doReturn(mockResponse).when(invocationBuilder).get(); doReturn(Response.Status.OK.getStatusCode()).when(mockResponse).getStatus(); doReturn("{\"pod\": \"true\"}").when(mockResponse).readEntity(String.class); IntegrationBridgeServiceInfo service = new IntegrationBridgeServiceInfo(MOCK_VERSION, MOCK_SERVICE_URL); assertEquals(Status.UNKNOWN.getCode(), service.getConnectivity()); invoker.handleHealthResponse(service, "invalid"); assertEquals(Status.DOWN.getCode(), service.getConnectivity()); }
@Override protected void handleHealthResponse(IntegrationBridgeServiceInfo service, String healthResponse) { JsonNode jsonNode = parseJsonResponse(healthResponse); if (jsonNode == null) { jsonNode = readAggregatedHC(); } Status status = retrieveConnectivityStatus(jsonNode); service.setConnectivity(status); }
KmAuthHealthInvoker extends AuthenticationServiceHealthInvoker { @Override protected void handleHealthResponse(IntegrationBridgeServiceInfo service, String healthResponse) { JsonNode jsonNode = parseJsonResponse(healthResponse); if (jsonNode == null) { jsonNode = readAggregatedHC(); } Status status = retrieveConnectivityStatus(jsonNode); service.setConnectivity(status); } }
KmAuthHealthInvoker extends AuthenticationServiceHealthInvoker { @Override protected void handleHealthResponse(IntegrationBridgeServiceInfo service, String healthResponse) { JsonNode jsonNode = parseJsonResponse(healthResponse); if (jsonNode == null) { jsonNode = readAggregatedHC(); } Status status = retrieveConnectivityStatus(jsonNode); service.setConnectivity(status); }  }
KmAuthHealthInvoker extends AuthenticationServiceHealthInvoker { @Override protected void handleHealthResponse(IntegrationBridgeServiceInfo service, String healthResponse) { JsonNode jsonNode = parseJsonResponse(healthResponse); if (jsonNode == null) { jsonNode = readAggregatedHC(); } Status status = retrieveConnectivityStatus(jsonNode); service.setConnectivity(status); }   }
KmAuthHealthInvoker extends AuthenticationServiceHealthInvoker { @Override protected void handleHealthResponse(IntegrationBridgeServiceInfo service, String healthResponse) { JsonNode jsonNode = parseJsonResponse(healthResponse); if (jsonNode == null) { jsonNode = readAggregatedHC(); } Status status = retrieveConnectivityStatus(jsonNode); service.setConnectivity(status); }    }