commit
0743da4987
|
@ -127,7 +127,7 @@ class ZipkinConfigurations {
|
||||||
static class ReporterConfiguration {
|
static class ReporterConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean(Reporter.class)
|
||||||
@ConditionalOnBean(Sender.class)
|
@ConditionalOnBean(Sender.class)
|
||||||
AsyncReporter<Span> spanReporter(Sender sender, BytesEncoder<Span> encoder) {
|
AsyncReporter<Span> spanReporter(Sender sender, BytesEncoder<Span> encoder) {
|
||||||
return AsyncReporter.builder(sender).build(encoder);
|
return AsyncReporter.builder(sender).build(encoder);
|
||||||
|
|
|
@ -56,7 +56,8 @@ class ZipkinConfigurationsReporterConfigurationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldBackOffOnCustomBeans() {
|
void shouldBackOffOnCustomBeans() {
|
||||||
this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> {
|
this.contextRunner.withUserConfiguration(SenderConfiguration.class, CustomConfiguration.class)
|
||||||
|
.run((context) -> {
|
||||||
assertThat(context).hasBean("customReporter");
|
assertThat(context).hasBean("customReporter");
|
||||||
assertThat(context).hasSingleBean(Reporter.class);
|
assertThat(context).hasSingleBean(Reporter.class);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue