diff --git a/dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/test/groovy/StackedOperatorsTest.groovy b/dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/test/groovy/StackedOperatorsTest.groovy index 22e4a241467..ccc58f15383 100644 --- a/dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/test/groovy/StackedOperatorsTest.groovy +++ b/dd-java-agent/instrumentation/resilience4j/resilience4j-reactor-2.0/src/test/groovy/StackedOperatorsTest.groovy @@ -8,33 +8,30 @@ import io.github.resilience4j.retry.RetryConfig import reactor.core.publisher.ConnectableFlux import reactor.core.publisher.Flux import reactor.core.scheduler.Schedulers - import static datadog.trace.agent.test.utils.TraceUtils.runnableUnderTrace +import spock.lang.RepeatUntilFailure class StackedOperatorsTest extends InstrumentationSpecification { + @RepeatUntilFailure(maxAttempts = 100) def "test stacked operators retry(circuitbreaker)"() { setup: ConnectableFlux connection = Flux .just("abc", "def") - .map({ serviceCall(it)}) + .map({serviceCall(it)}) .transformDeferred(CircuitBreakerOperator.of(CircuitBreaker.ofDefaults("C2"))) .transformDeferred(RetryOperator.of(Retry.of("R1", RetryConfig.custom().maxAttempts(3).build()))) .publishOn(Schedulers.boundedElastic()) .publish() when: - connection.subscribe { - runnableUnderTrace("child-" + it) {} - } - runnableUnderTrace("parent", { connection.connect() }) then: assertTraces(1) { - trace(6) { + trace(4) { sortSpansByStart() span(0) { operationName "parent" @@ -56,16 +53,6 @@ class StackedOperatorsTest extends InstrumentationSpecification { childOf span(1) errored false } - span(4) { - operationName "child-abc" - childOf span(1) - errored false - } - span(5) { - operationName "child-def" - childOf span(1) - errored false - } } } }