Skip to content

Commit

Permalink
Detache task for actor access
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Feb 14, 2024
1 parent 82a2d63 commit 1da4167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/KingfisherTests/KingfisherManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ actor CallingChecker {
stub: LSStubResponseDSL,
block: @escaping () async throws -> Void
) async throws {
let task = Task {
let task = Task.detached {
do {
_ = try await block()
XCTFail()
} catch {
mark()
await self.mark()
XCTAssertTrue((error as? KingfisherError)?.isTaskCancelled ?? false)
}
}
Expand Down

0 comments on commit 1da4167

Please sign in to comment.