@@ -194,6 +194,7 @@ class GRPCIdleHandlerStateMachineTests: GRPCTestCase {
194194 op3. assertGoAway ( streamID: . rootStream)
195195 op3. assertShouldClose ( )
196196 op3. assertCancelIdleTimeout ( )
197+ op3. assertConnectionManager ( . quiescing)
197198
198199 // Close; we were going to go idle anyway.
199200 let op4 = stateMachine. channelInactive ( )
@@ -207,6 +208,7 @@ class GRPCIdleHandlerStateMachineTests: GRPCTestCase {
207208 let op1 = stateMachine. initiateGracefulShutdown ( )
208209 op1. assertGoAway ( streamID: . rootStream)
209210 op1. assertShouldClose ( )
211+ op1. assertConnectionManager ( . quiescing)
210212
211213 // Closed.
212214 let op2 = stateMachine. channelInactive ( )
@@ -223,6 +225,7 @@ class GRPCIdleHandlerStateMachineTests: GRPCTestCase {
223225 // Initiate shutdown.
224226 let op2 = stateMachine. initiateGracefulShutdown ( )
225227 op2. assertShouldNotClose ( )
228+ op2. assertConnectionManager ( . quiescing)
226229
227230 // Receive a GOAWAY; no change.
228231 let op3 = stateMachine. receiveGoAway ( )
@@ -467,8 +470,9 @@ class GRPCIdleHandlerStateMachineTests: GRPCTestCase {
467470 let op5 = stateMachine. receiveGoAway ( )
468471 // We're the client, there are no server initiated streams, so GOAWAY with root stream.
469472 op5. assertGoAway ( streamID: 0 )
470- // No open streams, so we can close now.
473+ // No open streams, so we can close now. Also assert the connection manager got a quiescing event.
471474 op5. assertShouldClose ( )
475+ op5. assertConnectionManager ( . quiescing)
472476
473477 // Closed.
474478 let op6 = stateMachine. channelInactive ( )
@@ -495,6 +499,7 @@ class GRPCIdleHandlerStateMachineTests: GRPCTestCase {
495499 let op4 = stateMachine. receiveGoAway ( )
496500 op4. assertGoAway ( streamID: . maxID)
497501 op4. assertShouldPingAfterGoAway ( )
502+ op4. assertConnectionManager ( . quiescing)
498503
499504 // Create another stream. This is fine, the client hasn't ack'd the ping yet.
500505 let op5 = stateMachine. streamCreated ( withID: 7 )
0 commit comments