Fix tests that depend on previous Spring Boot config issue

fixes gh-2042
This commit is contained in:
Jonatan Ivanov
2021-10-20 16:16:25 -07:00
parent ccae09aae1
commit 79208f410f
2 changed files with 7 additions and 3 deletions

View File

@@ -496,7 +496,11 @@
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>

View File

@@ -52,8 +52,8 @@ public class CustomPropagationFactoryTests {
new ApplicationContextRunner().withUserConfiguration(CustomConfig.class)
.withPropertyValues("spring.sleuth.propagation.type=custom")
.withPropertyValues("spring.cloud.gateway.redis.enabled=false")
.withPropertyValues("spring.r2dbc.pool.enabled=true").run(context -> BDDAssertions.then(context)
.hasNotFailed().getBean(CustomConfig.CustomPropagation.class));
.withPropertyValues("spring.r2dbc.url=r2dbc:proxy:h2:mem:///test").run(context -> BDDAssertions
.then(context).hasNotFailed().getBean(CustomConfig.CustomPropagation.class));
}
@Configuration(proxyBeanMethods = false)