Trying to make tests less flakey

This commit is contained in:
Marcin Grzejszczak
2018-05-25 10:00:28 +02:00
parent e0120df86d
commit e8c734423d
2 changed files with 5 additions and 2 deletions

View File

@@ -72,7 +72,8 @@ import static org.assertj.core.api.BDDAssertions.then;
@SpringBootTest(classes = FeignClientServerErrorTests.TestConfiguration.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(properties = {
"spring.application.name=fooservice" ,
"spring.application.name=fooservice",
"spring.sleuth.sampler.probability=1.0",
"feign.hystrix.enabled=true",
"spring.sleuth.http.legacy.enabled=true",
"hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000",
@@ -225,7 +226,7 @@ public class FeignClientServerErrorTests {
}
@Bean
Sampler testSampler() {
Sampler alwaysSampler() {
return Sampler.ALWAYS_SAMPLE;
}

View File

@@ -113,7 +113,9 @@ public class MultipleHopsIntegrationTests {
ExtraFieldPropagation.set("foo", "bar");
ExtraFieldPropagation.set("UPPER_CASE", "someValue");
//end::baggage[]
}
try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(initialSpan)) {
//tag::baggage_tag[]
initialSpan.tag("foo",
ExtraFieldPropagation.get(initialSpan.context(), "foo"));