File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Tests/AWSLambdaRuntimeTests Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,21 +57,19 @@ struct LambdaRuntimeTests {
57
57
try await runtime2. run ( )
58
58
}
59
59
60
- // get the first result (should be a LambdaRuntimeError)
61
- let error1 = try await #require( throws: ( any Error ) . self) {
60
+ // get the first result (should throw a LambdaRuntimeError)
61
+ try await #require( throws: LambdaRuntimeError . self) {
62
62
try await taskGroup. next ( )
63
63
}
64
64
65
65
// cancel the other task
66
66
taskGroup. cancelAll ( )
67
67
68
- // get the second result (should be a ChannelError)
69
- let error2 = try await #require( throws: ( any Error ) . self) {
68
+ // get the second result (should throw a ChannelError)
69
+ try await #require( throws: ChannelError . self) {
70
70
try await taskGroup. next ( )
71
71
}
72
72
73
- #expect( error1 is LambdaRuntimeError , " First runtime should throw LambdaRuntimeError " )
74
- #expect( error2 is ChannelError , " Second runtime should throw ChannelError " )
75
73
}
76
74
77
75
// wait a small amount to ensure everything is cancelled and cleanup
You can’t perform that action at this time.
0 commit comments