Skip to content

Commit

Permalink
Switch back to for tests until Xcode 14.3 is available via Github Act…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
exPHAT committed Mar 31, 2023
1 parent 8f948fd commit 98a42d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
}
)

await fulfillment(of: [cancelExpectation, failureExpectation], timeout: timeout)
wait(for: [cancelExpectation, failureExpectation], timeout: timeout)
}

func testTranscribeCancellationRestart() async {
Expand Down Expand Up @@ -74,7 +74,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
}
)

await fulfillment(of: [cancelExpectation, failureExpectation, restartExpectation], timeout: timeout)
wait(for: [cancelExpectation, failureExpectation, restartExpectation], timeout: timeout)
}

func testTranscribeDoubleCancellation() async {
Expand Down Expand Up @@ -106,7 +106,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
}
)

await fulfillment(of: [cancelExpectation, failureExpectation], timeout: timeout)
wait(for: [cancelExpectation, failureExpectation], timeout: timeout)
}

func testTranscribePrematureCancellation() async {
Expand Down Expand Up @@ -149,7 +149,7 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
}

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


Expand Down Expand Up @@ -190,6 +190,6 @@ class TranscriptionCancellationTests: ResourceDependentTestCase, ModelFileTestCa
}

// Should be fine because function is async, but just to be safe
await fulfillment(of: [failureExpectation, cancelledExpectation, cancellationFailureExpectation], timeout: timeout)
wait(for: [failureExpectation, cancelledExpectation, cancellationFailureExpectation], timeout: timeout)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
successExpectation.fulfill()
}

await fulfillment(of: [successExpectation], timeout: timeout)
wait(for: [successExpectation], timeout: timeout)
}

func testTranscribeExclusivity() async {
Expand Down Expand Up @@ -59,7 +59,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
failureExpectation.fulfill()
}

await fulfillment(of: [successExpectation, failureExpectation], timeout: timeout)
wait(for: [successExpectation, failureExpectation], timeout: timeout)
}

func testTranscribeInvalidFramesError() async {
Expand All @@ -77,7 +77,7 @@ class TranscriptionTests: ResourceDependentTestCase, ModelFileTestCase, AudioFil
failureExpectation.fulfill()
}

await fulfillment(of: [failureExpectation], timeout: 5)
wait(for: [failureExpectation], timeout: 5)
}

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

XCTAssert(segments.count > 0)

await fulfillment(of: [
wait(for: [
try XCTUnwrap(delegateNewSegmentExpectation),
try XCTUnwrap(delegateProgessExpectation),
try XCTUnwrap(delegateCompletionExpectation)
Expand Down

0 comments on commit 98a42d3

Please sign in to comment.