Skip to content

Commit

Permalink
Avoid using iOS 16 or later overload of Task.sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Nov 4, 2024
1 parent 403a4d5 commit 9fde196
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/TelemetryDeckTests/LogHandlerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ actor LogHandlerTests {
#expect(counter == 0)

handler.log(.debug, message: "")
try await Task.sleep(for: .milliseconds(10))
try await Task.sleep(nanoseconds: 10_000_000) // 10 milliseconds
#expect(counter == 0)

handler.log(.info, message: "")
try await Task.sleep(for: .milliseconds(10))
try await Task.sleep(nanoseconds: 10_000_000) // 10 milliseconds
#expect(counter == 1)

handler.log(.error, message: "")
try await Task.sleep(for: .milliseconds(10))
try await Task.sleep(nanoseconds: 10_000_000) // 10 milliseconds
#expect(counter == 2)
}

Expand All @@ -42,7 +42,7 @@ actor LogHandlerTests {
}

handler.log(message: "")
try await Task.sleep(for: .milliseconds(10))
try await Task.sleep(nanoseconds: 10_000_000) // 10 milliseconds
#expect(lastLevel == .info)
}

Expand Down

0 comments on commit 9fde196

Please sign in to comment.