File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/test/groovy Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -8,33 +8,30 @@ import io.github.resilience4j.retry.RetryConfig
88import reactor.core.publisher.ConnectableFlux
99import reactor.core.publisher.Flux
1010import reactor.core.scheduler.Schedulers
11-
1211import static datadog.trace.agent.test.utils.TraceUtils.runnableUnderTrace
12+ import spock.lang.RepeatUntilFailure
1313
1414class StackedOperatorsTest extends InstrumentationSpecification {
1515
16+ @RepeatUntilFailure (maxAttempts = 100 )
1617 def "test stacked operators retry (circuitbreaker )" () {
1718 setup:
1819 ConnectableFlux<String> connection = Flux
1920 .just(" abc" , " def " )
20- .map({ serviceCall(it)})
21+ .map({serviceCall(it)})
2122 .transformDeferred(CircuitBreakerOperator.of(CircuitBreaker.ofDefaults(" C2 " )))
2223 .transformDeferred(RetryOperator.of(Retry.of(" R1 " , RetryConfig.custom().maxAttempts(3).build())))
2324 .publishOn(Schedulers.boundedElastic())
2425 .publish()
2526
2627 when:
27- connection.subscribe {
28- runnableUnderTrace(" child- " + it) {}
29- }
30-
3128 runnableUnderTrace(" parent" , {
3229 connection.connect()
3330 })
3431
3532 then:
3633 assertTraces(1) {
37- trace(6 ) {
34+ trace(4 ) {
3835 sortSpansByStart()
3936 span(0) {
4037 operationName " parent"
@@ -56,16 +53,6 @@ class StackedOperatorsTest extends InstrumentationSpecification {
5653 childOf span(1)
5754 errored false
5855 }
59- span(4) {
60- operationName " child- abc"
61- childOf span(1)
62- errored false
63- }
64- span(5) {
65- operationName " child- def "
66- childOf span(1)
67- errored false
68- }
6956 }
7057 }
7158 }
You can’t perform that action at this time.
0 commit comments