Search in sources :

Example 31 with HealthCheckRegistry

use of com.codahale.metrics.health.HealthCheckRegistry in project dropwizard by dropwizard.

the class HealthCheckConfigValidatorTest method startValidationsShouldSucceedWhenNoHealthChecksConfigured.

@Test
void startValidationsShouldSucceedWhenNoHealthChecksConfigured() throws Exception {
    // given
    List<HealthCheckConfiguration> configs = emptyList();
    HealthCheckRegistry registry = new HealthCheckRegistry();
    // when
    HealthCheckConfigValidator validator = new HealthCheckConfigValidator(configs, registry);
    validator.start();
    // then
    verifyNoInteractions(mockLogAppender);
}
Also used : HealthCheckRegistry(com.codahale.metrics.health.HealthCheckRegistry) Test(org.junit.jupiter.api.Test)

Aggregations

HealthCheckRegistry (com.codahale.metrics.health.HealthCheckRegistry)31 Test (org.junit.Test)11 MetricRegistry (com.codahale.metrics.MetricRegistry)6 HealthCheck (com.codahale.metrics.health.HealthCheck)6 Test (org.junit.jupiter.api.Test)6 HikariDataSource (com.zaxxer.hikari.HikariDataSource)3 ServletContext (jakarta.servlet.ServletContext)3 ServletContext (javax.servlet.ServletContext)3 ILoggingEvent (ch.qos.logback.classic.spi.ILoggingEvent)2 LoggingEvent (ch.qos.logback.classic.spi.LoggingEvent)2 Result (com.codahale.metrics.health.HealthCheck.Result)2 HealthCheckFilter (com.codahale.metrics.health.HealthCheckFilter)2 HealthCheckModule (com.codahale.metrics.json.HealthCheckModule)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 ServletConfig (jakarta.servlet.ServletConfig)2 Connection (java.sql.Connection)2 ExecutorService (java.util.concurrent.ExecutorService)2 Connector (org.eclipse.jetty.server.Connector)2 HttpConnectionFactory (org.eclipse.jetty.server.HttpConnectionFactory)2 Server (org.eclipse.jetty.server.Server)2