File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Tests/AWSLambdaRuntimeTests Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ public final class LambdaRuntime<Handler>: @unchecked Sendable where Handler: St
63
63
if original {
64
64
throw LambdaRuntimeError ( code: . moreThanOneLambdaRuntimeInstance)
65
65
}
66
-
66
+
67
67
defer {
68
- _isRunning. store ( false , ordering: . releasing)
68
+ _isRunning. store ( false , ordering: . releasing)
69
69
}
70
-
70
+
71
71
try await self . _run ( )
72
72
}
73
73
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ struct LambdaRuntimeTests {
47
47
try await runtime1. run ( )
48
48
}
49
49
}
50
-
50
+
51
51
// wait a small amount to ensure runtime1 task is started
52
52
try await Task . sleep ( for: . seconds( 1 ) )
53
53
54
54
// Running the second runtime should trigger LambdaRuntimeError
55
55
await #expect( throws: LambdaRuntimeError . self) {
56
56
try await runtime2. run ( )
57
57
}
58
-
58
+
59
59
// cancel runtime 1 / task 1
60
60
print ( " --- cancelling --- " )
61
61
taskGroup. cancelAll ( )
You can’t perform that action at this time.
0 commit comments