use of io.quarkus.deployment.metrics.MetricsCapabilityBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method addMetricsDoesAddStorageProviderMetricsIfEnabledAndMicroMeterSupport.
@Test
void addMetricsDoesAddStorageProviderMetricsIfEnabledAndMicroMeterSupport() {
final AdditionalBeanBuildItem metricsBeanBuildItem = jobRunrExtensionProcessor.addMetrics(Optional.of(new MetricsCapabilityBuildItem(toSupport -> toSupport.equals(MetricsFactory.MICROMETER))), jobRunrConfiguration);
assertThat(metricsBeanBuildItem.getBeanClasses()).contains(JobRunrMetricsStarter.class.getName()).contains(JobRunrMetricsProducer.StorageProviderMetricsProducer.class.getName()).doesNotContain(JobRunrMetricsProducer.BackgroundJobServerMetricsProducer.class.getName());
}
use of io.quarkus.deployment.metrics.MetricsCapabilityBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method addMetricsDoesNotAddMetricsIfEnabledButNoMicroMeterSupport.
@Test
void addMetricsDoesNotAddMetricsIfEnabledButNoMicroMeterSupport() {
final AdditionalBeanBuildItem metricsBeanBuildItem = jobRunrExtensionProcessor.addMetrics(Optional.of(new MetricsCapabilityBuildItem(toSupport -> false)), jobRunrConfiguration);
assertThat(metricsBeanBuildItem).isNull();
}
use of io.quarkus.deployment.metrics.MetricsCapabilityBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method addMetricsDoesAddStorageProviderAndBackgroundJobServerMetricsIfEnabledAndMicroMeterSupport.
@Test
void addMetricsDoesAddStorageProviderAndBackgroundJobServerMetricsIfEnabledAndMicroMeterSupport() {
backgroundJobServerConfiguration.enabled = true;
final AdditionalBeanBuildItem metricsBeanBuildItem = jobRunrExtensionProcessor.addMetrics(Optional.of(new MetricsCapabilityBuildItem(toSupport -> toSupport.equals(MetricsFactory.MICROMETER))), jobRunrConfiguration);
assertThat(metricsBeanBuildItem.getBeanClasses()).contains(JobRunrMetricsStarter.class.getName()).contains(JobRunrMetricsProducer.StorageProviderMetricsProducer.class.getName()).contains(JobRunrMetricsProducer.BackgroundJobServerMetricsProducer.class.getName());
}
Aggregations