tck/src/main/java/org/eclipse/microprofile/health/tck/SingleHealthFailedTest.java
/**
     * Verifies the health integration with CDI at the scope of a server runtime
     */
Verifies the health integration with CDI at the scope of a server runtime
Verifies the health integration with CDI at the scope of a server runtime
@Test
    @RunAsClient
    public void testFailureResponsePayload() {
        Response response = getUrlHealthContents();
        Assert.assertEquals(response.getStatus(), 503);
        JsonObject json = readJson(response);
        JsonArray checks = json.getJsonArray("checks");
        Assert.assertEquals(checks.size(),1,"Expected a single check response");
        assertFailureCheck(checks.getJsonObject(0), "failed-check");
        assertOverallFailure(json);
    }
@ Test @ RunAsClient public void testFailureResponsePayload ( ) { Response response = getUrlHealthContents ( ) ; Assert . assertEquals ( response . getStatus ( ) , 503 ) ; JsonObject json = readJson ( response ) ; JsonArray checks = json . getJsonArray ( "checks" ) ; Assert . assertEquals ( checks . size ( ) , 1 , "Expected a single check response" ) ; assertFailureCheck ( checks . getJsonObject ( 0 ) , "failed-check" ) ; assertOverallFailure ( json ) ; }
Verifies the health integration with CDI at the scope of a server runtime
Verifies the health integration with CDI at the scope of a server runtime
// status code // response size // single procedure response