diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 67f1fdc48..a537ee678 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ concurrency: env: TEST_TARGETS: "LiveKitCoreTests LiveKitObjCTests" - TEST_TIMEOUT_MINUTES: 10 + TEST_TIMEOUT_MINUTES: 15 TEST_RETRY_ATTEMPTS: 3 jobs: @@ -90,7 +90,7 @@ jobs: platform: "tvOS Simulator,name=Apple TV,OS=26.0" runs-on: ${{ matrix.os }} - timeout-minutes: 35 + timeout-minutes: 60 defaults: run: shell: bash @@ -141,7 +141,7 @@ jobs: -enableThreadSanitizer ${{ matrix.tsan == true && 'YES' || 'NO' }} \ APPLICATION_EXTENSION_API_ONLY=${{ matrix.extension-api-only == true && 'YES' || 'NO' }} \ -only-testing:$test \ - -parallel-testing-enabled YES \ + -parallel-testing-enabled NO \ | xcbeautify --renderer github-actions then echo "::error::Test failed: $test" diff --git a/Sources/LiveKit/Support/AudioMixRecorder.swift b/Sources/LiveKit/Support/AudioMixRecorder.swift index 46f8c6771..70e94f7e0 100644 --- a/Sources/LiveKit/Support/AudioMixRecorder.swift +++ b/Sources/LiveKit/Support/AudioMixRecorder.swift @@ -161,7 +161,10 @@ public class AudioMixRecorder: Loggable, @unchecked Sendable { source.stop() } audioEngine.stop() - audioFile = nil + + writeQueue.sync { + audioFile = nil + } } // MARK: - Source diff --git a/Tests/LiveKitTestSupport/Assertions.swift b/Tests/LiveKitTestSupport/Assertions.swift index edcd68608..7546a949e 100644 --- a/Tests/LiveKitTestSupport/Assertions.swift +++ b/Tests/LiveKitTestSupport/Assertions.swift @@ -28,6 +28,7 @@ public func XCTAssertThrowsErrorAsync(_ expression: @autoclosure () async throws public extension LKTestCase { func noLeaks(of instance: AnyObject & Sendable, file: StaticString = #filePath, line: UInt = #line) { addTeardownBlock { [weak instance] in + try await Task.sleep(nanoseconds: NSEC_PER_SEC) XCTAssertNil(instance, "Leaked object: \(String(describing: instance))", file: file, line: line) } }