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 {
5757 try await runtime2. run ( )
5858 }
5959
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) {
6262 try await taskGroup. next ( )
6363 }
6464
6565 // cancel the other task
6666 taskGroup. cancelAll ( )
6767
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) {
7070 try await taskGroup. next ( )
7171 }
7272
73- #expect( error1 is LambdaRuntimeError , " First runtime should throw LambdaRuntimeError " )
74- #expect( error2 is ChannelError , " Second runtime should throw ChannelError " )
7573 }
7674
7775 // wait a small amount to ensure everything is cancelled and cleanup
You can’t perform that action at this time.
0 commit comments