use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducerUsesElasticSearchStorageProviderIfElasticSearchRestHighLevelClientCapabilityIsPresent.
@Test
void producesJobRunrProducerUsesElasticSearchStorageProviderIfElasticSearchRestHighLevelClientCapabilityIsPresent() {
lenient().when(capabilities.isPresent(Capability.ELASTICSEARCH_REST_HIGH_LEVEL_CLIENT)).thenReturn(true);
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrElasticSearchStorageProviderProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem 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.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducer.
@Test
void producesJobRunrProducer() {
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrProducer.class.getName()).contains(JobRunrStarter.class.getName()).contains(JobRunrInMemoryStorageProviderProducer.class.getName()).contains(JobRunrProducer.JobRunrJsonBJsonMapperProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem 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());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method addMetricsDoesNotAddMetricsIfNotEnabled.
@Test
void addMetricsDoesNotAddMetricsIfNotEnabled() {
final AdditionalBeanBuildItem metricsBeanBuildItem = jobRunrExtensionProcessor.addMetrics(Optional.empty(), jobRunrConfiguration);
assertThat(metricsBeanBuildItem).isNull();
}
Aggregations