Add assertion to redisson async test
MODIFY
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonAsyncClientTest.groovy
instrumentation/redisson-3.0/javaagent/src/test/groovy/RedissonAsyncClientTest.groovy
* SPDX-License-Identifier: Apache-2.0
*/
+import io.opentelemetry.api.trace.Span
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
import org.redisson.Redisson
@@ -88,6 +89,7 @@ class RedissonAsyncClientTest extends AgentInstrumentationSpecification {
RFuture<Boolean> result = runWithSpan("parent") {
RFuture<Boolean> result = rSet.addAsync("s1")
result.whenComplete({ res, throwable ->
+ assert Span.current().getSpanContext().isValid(): "Callback should have a parent span."
runWithSpan("callback") {
}
})

Add assertion to redisson async test (#5768)