File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Tests/PostgresNIOTests/New Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,8 @@ final class PSQLEventsHandler: ChannelInboundHandler {
68
68
case . authenticated:
69
69
break
70
70
}
71
- case TLSUserEvent . shutdownCompleted:
72
- break
73
71
default :
74
- preconditionFailure ( )
72
+ context . fireUserInboundEventTriggered ( event )
75
73
}
76
74
}
77
75
Original file line number Diff line number Diff line change @@ -416,6 +416,15 @@ class PostgresConnectionTests: XCTestCase {
416
416
}
417
417
}
418
418
419
+ func testWeDontCrashOnUnexpectedChannelEvents( ) async throws {
420
+ let ( connection, channel) = try await self . makeTestConnectionWithAsyncTestingChannel ( )
421
+
422
+ enum MyEvent {
423
+ case pleaseDontCrash
424
+ }
425
+ channel. pipeline. fireUserInboundEventTriggered ( MyEvent . pleaseDontCrash)
426
+ }
427
+
419
428
func testSerialExecutionOfSamePreparedStatement( ) async throws {
420
429
let ( connection, channel) = try await self . makeTestConnectionWithAsyncTestingChannel ( )
421
430
You can’t perform that action at this time.
0 commit comments