Add assertion to redisson async test
* 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") {
}
})
