Skip to content

Commit

Permalink
Fix invalid back off behavior (ZipkinConfigurations.ReporterConfigura…
Browse files Browse the repository at this point in the history
…tion.spanReporter)
  • Loading branch information
be-hase committed May 17, 2023
1 parent 87a7043 commit 4db9b52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static class ReporterConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(Sender.class)
AsyncReporter<Span> spanReporter(Sender sender, BytesEncoder<Span> encoder) {
Reporter<Span> spanReporter(Sender sender, BytesEncoder<Span> encoder) {
return AsyncReporter.builder(sender).build(encoder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ void shouldNotSupplyReporterIfSenderIsMissing() {

@Test
void shouldBackOffOnCustomBeans() {
this.contextRunner.withUserConfiguration(CustomConfiguration.class).run((context) -> {
assertThat(context).hasBean("customReporter");
assertThat(context).hasSingleBean(Reporter.class);
});
this.contextRunner.withUserConfiguration(SenderConfiguration.class, CustomConfiguration.class)
.run((context) -> {
assertThat(context).hasBean("customReporter");
assertThat(context).hasSingleBean(Reporter.class);
});
}

@Configuration(proxyBeanMethods = false)
Expand Down

0 comments on commit 4db9b52

Please sign in to comment.