Search in sources :

Example 11 with HealthCheckResponse

use of io.confluent.ksql.rest.entity.HealthCheckResponse in project ksql by confluentinc.

the class HealthCheckResourceFunctionalTest method shouldCheckHealth.

@Test
public void shouldCheckHealth() {
    // When:
    final HealthCheckResponse response = RestIntegrationTestUtil.checkServerHealth(REST_APP);
    // Then:
    assertThat("server should be healthy", response.getIsHealthy());
    assertThat(response.getDetails().get(KAFKA_CHECK_NAME).getIsHealthy(), is(true));
    assertThat(response.getDetails().get(METASTORE_CHECK_NAME).getIsHealthy(), is(true));
    assertThat(response.getDetails().get(COMMAND_RUNNER_CHECK_NAME).getIsHealthy(), is(true));
}
Also used : HealthCheckResponse(io.confluent.ksql.rest.entity.HealthCheckResponse) IntegrationTest(io.confluent.common.utils.IntegrationTest) Test(org.junit.Test)

Aggregations

HealthCheckResponse (io.confluent.ksql.rest.entity.HealthCheckResponse)11 Test (org.junit.Test)10 IntegrationTest (io.confluent.common.utils.IntegrationTest)2 KsqlEntity (io.confluent.ksql.rest.entity.KsqlEntity)2 KsqlWarning (io.confluent.ksql.rest.entity.KsqlWarning)2 UnknownTopicOrPartitionException (org.apache.kafka.common.errors.UnknownTopicOrPartitionException)2 HealthCheckResponseDetail (io.confluent.ksql.rest.entity.HealthCheckResponseDetail)1 KsqlConfig (io.confluent.ksql.util.KsqlConfig)1 HashMap (java.util.HashMap)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1