Merge branch '1.2.x'
This commit is contained in:
@@ -53,7 +53,7 @@ public class TraceFeignClientAutoConfiguration {
|
||||
@Bean
|
||||
@Scope("prototype")
|
||||
@ConditionalOnClass(name = {"com.netflix.hystrix.HystrixCommand", "feign.hystrix.HystrixFeign"})
|
||||
@ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "feign.hystrix.enabled", havingValue = "true")
|
||||
Feign.Builder feignHystrixBuilder(BeanFactory beanFactory) {
|
||||
return SleuthHystrixFeignBuilder.builder(beanFactory);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class TraceFeignClientAutoConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@Scope("prototype")
|
||||
@ConditionalOnProperty(name = "feign.hystrix.enabled", havingValue = "false")
|
||||
@ConditionalOnProperty(name = "feign.hystrix.enabled", havingValue = "false", matchIfMissing = true)
|
||||
Feign.Builder feignBuilder(BeanFactory beanFactory) {
|
||||
return SleuthFeignBuilder.builder(beanFactory);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ import static org.springframework.cloud.sleuth.assertions.SleuthAssertions.then;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = FeignClientServerErrorTests.TestConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@TestPropertySource(properties = { "spring.application.name=fooservice" })
|
||||
@TestPropertySource(properties = { "spring.application.name=fooservice" ,
|
||||
"feign.hystrix.enabled=true"})
|
||||
public class FeignClientServerErrorTests {
|
||||
|
||||
@Autowired TestFeignInterface feignInterface;
|
||||
@@ -139,7 +140,6 @@ public class FeignClientServerErrorTests {
|
||||
Awaitility.await().untilAsserted(() -> {
|
||||
then(this.capture.toString()).doesNotContain("Tried to close span but it is not the current span");
|
||||
then(ExceptionUtils.getLastException()).isNull();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user