use of org.springframework.boot.actuate.metrics.dropwizard.ReservoirFactory in project spring-boot by spring-projects.
the class MetricsDropwizardAutoConfigurationTests method dropwizardWithoutCustomReservoirConfigured.
@Test
public void dropwizardWithoutCustomReservoirConfigured() {
this.context = new AnnotationConfigApplicationContext(MetricsDropwizardAutoConfiguration.class);
DropwizardMetricServices dropwizardMetricServices = this.context.getBean(DropwizardMetricServices.class);
ReservoirFactory reservoirFactory = (ReservoirFactory) ReflectionTestUtils.getField(dropwizardMetricServices, "reservoirFactory");
assertThat(reservoirFactory.getReservoir("test")).isNull();
}
use of org.springframework.boot.actuate.metrics.dropwizard.ReservoirFactory in project spring-boot by spring-projects.
the class MetricsDropwizardAutoConfigurationTests method dropwizardWithCustomReservoirConfigured.
@Test
public void dropwizardWithCustomReservoirConfigured() {
this.context = new AnnotationConfigApplicationContext(MetricsDropwizardAutoConfiguration.class, Config.class);
DropwizardMetricServices dropwizardMetricServices = this.context.getBean(DropwizardMetricServices.class);
ReservoirFactory reservoirFactory = (ReservoirFactory) ReflectionTestUtils.getField(dropwizardMetricServices, "reservoirFactory");
assertThat(reservoirFactory.getReservoir("test")).isInstanceOf(UniformReservoir.class);
}
Aggregations