Rename Tests' timeout() function (#555)

Fixes
https://github.com/swift-server/swift-aws-lambda-runtime/issues/553
This commit is contained in:
Sébastien Stormacq
2025-09-01 13:31:45 +02:00
committed by GitHub
parent 53ec1cbf3a
commit ec28c96696
2 changed files with 2 additions and 2 deletions
@@ -299,7 +299,7 @@ struct LambdaRuntimeClientTests {
// simulate traffic until the server reports it has closed the connection
// or a timeout, whichever comes first
// result is ignored here, either there is a connection error or a timeout
let _ = try await timeout(deadline: .seconds(1)) {
let _ = try await withTimeout(deadline: .seconds(1)) {
while true {
let (_, writer) = try await runtimeClient.nextInvocation()
try await writer.writeAndFinish(ByteBuffer(string: "hello"))
+1 -1
View File
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
// as suggested by https://github.com/vapor/postgres-nio/issues/489#issuecomment-2186509773
func timeout<Success: Sendable>(
func withTimeout<Success: Sendable>(
deadline: Duration,
_ closure: @escaping @Sendable () async throws -> Success
) async throws -> Success {