mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
Rename Tests' timeout() function (#555)
Fixes https://github.com/swift-server/swift-aws-lambda-runtime/issues/553
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user