Skip to content

Commit 98a42d3

Browse files
committed
Switch back to for tests until Xcode 14.3 is available via Github Actions
1 parent 8f948fd commit 98a42d3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Tests/WhisperTests/Transcription Tests/TranscriptionCancellationTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
3737
}
3838
)
3939

40-
await fulfillment(of: [cancelExpectation, failureExpectation], timeout: timeout)
40+
wait(for: [cancelExpectation, failureExpectation], timeout: timeout)
4141
}
4242

4343
func testTranscribeCancellationRestart() async {
@@ -74,7 +74,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
7474
}
7575
)
7676

77-
await fulfillment(of: [cancelExpectation, failureExpectation, restartExpectation], timeout: timeout)
77+
wait(for: [cancelExpectation, failureExpectation, restartExpectation], timeout: timeout)
7878
}
7979

8080
func testTranscribeDoubleCancellation() async {
@@ -106,7 +106,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
106106
}
107107
)
108108

109-
await fulfillment(of: [cancelExpectation, failureExpectation], timeout: timeout)
109+
wait(for: [cancelExpectation, failureExpectation], timeout: timeout)
110110
}
111111

112112
func testTranscribePrematureCancellation() async {
@@ -149,7 +149,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
149149
}
150150

151151
// Should be fine because function is async, but just to be safe
152-
await fulfillment(of: [failureExpectation, cancelledExpectation], timeout: timeout)
152+
wait(for: [failureExpectation, cancelledExpectation], timeout: timeout)
153153
}
154154

155155

@@ -190,6 +190,6 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
190190
}
191191

192192
// Should be fine because function is async, but just to be safe
193-
await fulfillment(of: [failureExpectation, cancelledExpectation, cancellationFailureExpectation], timeout: timeout)
193+
wait(for: [failureExpectation, cancelledExpectation, cancellationFailureExpectation], timeout: timeout)
194194
}
195195
}

Tests/WhisperTests/Transcription Tests/TranscriptionTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
2929
successExpectation.fulfill()
3030
}
3131

32-
await fulfillment(of: [successExpectation], timeout: timeout)
32+
wait(for: [successExpectation], timeout: timeout)
3333
}
3434

3535
func testTranscribeExclusivity() async {
@@ -59,7 +59,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
5959
failureExpectation.fulfill()
6060
}
6161

62-
await fulfillment(of: [successExpectation, failureExpectation], timeout: timeout)
62+
wait(for: [successExpectation, failureExpectation], timeout: timeout)
6363
}
6464

6565
func testTranscribeInvalidFramesError() async {
@@ -77,7 +77,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
7777
failureExpectation.fulfill()
7878
}
7979

80-
await fulfillment(of: [failureExpectation], timeout: 5)
80+
wait(for: [failureExpectation], timeout: 5)
8181
}
8282

8383
// Used in testTranscribeDelegate()
@@ -101,7 +101,7 @@ extension TranscriptionTests: WhisperDelegate {
101101

102102
XCTAssert(segments.count > 0)
103103

104-
await fulfillment(of: [
104+
wait(for: [
105105
try XCTUnwrap(delegateNewSegmentExpectation),
106106
try XCTUnwrap(delegateProgessExpectation),
107107
try XCTUnwrap(delegateCompletionExpectation)

0 commit comments

Comments
 (0)