Skip to content

Commit 263048b

Browse files
authored
Flaky tests (#826)
- Disable parallel testing (premature optimization?) - Increase timeouts accordingly
1 parent 63258bd commit 263048b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
env:
1919
TEST_TARGETS: "LiveKitCoreTests LiveKitObjCTests"
20-
TEST_TIMEOUT_MINUTES: 10
20+
TEST_TIMEOUT_MINUTES: 15
2121
TEST_RETRY_ATTEMPTS: 3
2222

2323
jobs:
@@ -90,7 +90,7 @@ jobs:
9090
platform: "tvOS Simulator,name=Apple TV,OS=26.0"
9191

9292
runs-on: ${{ matrix.os }}
93-
timeout-minutes: 35
93+
timeout-minutes: 60
9494
defaults:
9595
run:
9696
shell: bash
@@ -141,7 +141,7 @@ jobs:
141141
-enableThreadSanitizer ${{ matrix.tsan == true && 'YES' || 'NO' }} \
142142
APPLICATION_EXTENSION_API_ONLY=${{ matrix.extension-api-only == true && 'YES' || 'NO' }} \
143143
-only-testing:$test \
144-
-parallel-testing-enabled YES \
144+
-parallel-testing-enabled NO \
145145
| xcbeautify --renderer github-actions
146146
then
147147
echo "::error::Test failed: $test"

Sources/LiveKit/Support/AudioMixRecorder.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ public class AudioMixRecorder: Loggable, @unchecked Sendable {
161161
source.stop()
162162
}
163163
audioEngine.stop()
164-
audioFile = nil
164+
165+
writeQueue.sync {
166+
audioFile = nil
167+
}
165168
}
166169

167170
// MARK: - Source

Tests/LiveKitTestSupport/Assertions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public func XCTAssertThrowsErrorAsync(_ expression: @autoclosure () async throws
2828
public extension LKTestCase {
2929
func noLeaks(of instance: AnyObject & Sendable, file: StaticString = #filePath, line: UInt = #line) {
3030
addTeardownBlock { [weak instance] in
31+
try await Task.sleep(nanoseconds: NSEC_PER_SEC)
3132
XCTAssertNil(instance, "Leaked object: \(String(describing: instance))", file: file, line: line)
3233
}
3334
}

0 commit comments

Comments
 (0)