diff --git a/Tests/AWSLambdaRuntimeTests/LambdaRuntimeClientTests.swift b/Tests/AWSLambdaRuntimeTests/LambdaRuntimeClientTests.swift index fe85f973..f10026f9 100644 --- a/Tests/AWSLambdaRuntimeTests/LambdaRuntimeClientTests.swift +++ b/Tests/AWSLambdaRuntimeTests/LambdaRuntimeClientTests.swift @@ -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")) diff --git a/Tests/AWSLambdaRuntimeTests/Timeout.swift b/Tests/AWSLambdaRuntimeTests/Timeout.swift index 6a8dc5dc..934325cd 100644 --- a/Tests/AWSLambdaRuntimeTests/Timeout.swift +++ b/Tests/AWSLambdaRuntimeTests/Timeout.swift @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// // as suggested by https://github.com/vapor/postgres-nio/issues/489#issuecomment-2186509773 -func timeout( +func withTimeout( deadline: Duration, _ closure: @escaping @Sendable () async throws -> Success ) async throws -> Success {