Merge branch '1.3.x'
This commit is contained in:
@@ -43,7 +43,7 @@ class ZipkinSenderCondition extends SpringBootCondition {
|
||||
return ConditionOutcome.match(message.because("automatic sender type"));
|
||||
}
|
||||
String senderType = getType(((AnnotationMetadata) md).getClassName());
|
||||
if (property.equals(senderType)) {
|
||||
if (property.equalsIgnoreCase(senderType)) {
|
||||
return ConditionOutcome.match(message.because(property + " sender type"));
|
||||
}
|
||||
return ConditionOutcome.noMatch(message.because(property + " sender type"));
|
||||
|
||||
@@ -152,6 +152,22 @@ public class ZipkinAutoConfigurationTests {
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canOverrideBySenderAndIsCaseInsensitive() throws Exception {
|
||||
context = new AnnotationConfigApplicationContext();
|
||||
addEnvironment(context, "spring.zipkin.sender.type:WEB");
|
||||
context.register(
|
||||
PropertyPlaceholderAutoConfiguration.class,
|
||||
RabbitAutoConfiguration.class,
|
||||
KafkaAutoConfiguration.class,
|
||||
ZipkinAutoConfiguration.class);
|
||||
context.refresh();
|
||||
|
||||
then(context.getBean(Sender.class).getClass().getName()).contains("RestTemplateSender");
|
||||
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rabbitWinsWhenKafkaPresent() throws Exception {
|
||||
context = new AnnotationConfigApplicationContext();
|
||||
|
||||
Reference in New Issue
Block a user