Skip to content

Commit 3bf05ad

Browse files
authored
Merge pull request #1743 from ahoppen/withtimeout-issue
2 parents 3e01a5c + 77f02fc commit 3bf05ad

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Sources/SKTestSupport/RepeatUntilExpectedResult.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ package func repeatUntilExpectedResult(
2626
file: StaticString = #filePath,
2727
line: UInt = #line
2828
) async throws {
29-
logger.info("x: \(Int(timeout.seconds / sleepInterval.seconds))")
3029
for _ in 0..<Int(timeout.seconds / sleepInterval.seconds) {
3130
if try await body() {
3231
return

Sources/SwiftExtensions/AsyncUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ package func withTimeout<T: Sendable>(
189189

190190
let timeoutTask = Task {
191191
try await Task.sleep(for: duration)
192-
bodyTask.cancel()
193192
continuation.yield(with: .failure(TimeoutError()))
193+
bodyTask.cancel()
194194
}
195195
mutableTasks = [bodyTask, timeoutTask]
196196
}

0 commit comments

Comments
 (0)