             XCTAssert(OpenTelemetry.instance.contextProvider.activeSpan === nil)
             waitForExpectations(timeout: 30)
         }
+
     #endif
 }

        }

        @available(macOS 10.15, iOS 13.0, tvOS 13.0, *)
        func testStartAndEndSpanInAsyncTaskDetachedWithParent() {
            XCTExpectFailure()
            let span1 = defaultTracer.spanBuilder(spanName: "testStartAndEndSpanInAsyncTask1").startSpan()
            ActivityContextManager.instance.setCurrentContextValue(forKey: .span, value: span1)
            let expec = expectation(description: "testStartAndEndSpanInAsyncTaskWithParent")
            Task.detached {
                XCTAssert(ActivityContextManager.instance.getCurrentContextValue(forKey: .span) === span1)
                await self.createAsyncSpan(parentSpan: span1)
                XCTAssert(OpenTelemetry.instance.contextProvider.activeSpan === span1)
                expec.fulfill()
            }
            span1.end()

        return newSpan
    }

    func endSpanAndValidateContext(span: Span, parentSpan: Span?) {
        var activeSpan = ActivityContextManager.instance.getCurrentContextValue(forKey: .span)
        XCTAssert(activeSpan === span)
        span.end()
