File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
Tests/AWSLambdaRuntimeTests Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -62,27 +62,10 @@ struct LambdaRuntimeTests {
62
62
try await taskGroup. next ( )
63
63
}
64
64
65
- // cancel the group to end the test
65
+ // cancel the group to end the test
66
66
taskGroup. cancelAll ( )
67
67
68
68
}
69
-
70
- // wait a small amount to ensure everything is cancelled and cleanup
71
- try await Task . sleep ( for: . seconds( 0.5 ) )
72
-
73
- // Running the second runtime should work now
74
- try await withThrowingTaskGroup ( of: Void . self) { taskGroup in
75
- taskGroup. addTask {
76
- // ChannelError will be thrown when we cancel the task group
77
- await #expect( throws: ChannelError . self) {
78
- try await runtime2. run ( )
79
- }
80
- }
81
-
82
- // Set timeout and cancel the runtime 2
83
- try await Task . sleep ( for: . seconds( 1 ) )
84
- taskGroup. cancelAll ( )
85
- }
86
69
}
87
70
@Test ( " run() must be cancellable " )
88
71
func testLambdaRuntimeCancellable( ) async throws {
You can’t perform that action at this time.
0 commit comments