]> git.feebdaed.xyz Git - 0xmirror/grpc-go.git/commit
test: use the connectivity state watcher API (#8708)
authorEaswar Swaminathan <easwars@google.com>
Fri, 14 Nov 2025 07:54:36 +0000 (23:54 -0800)
committerGitHub <noreply@github.com>
Fri, 14 Nov 2025 07:54:36 +0000 (23:54 -0800)
commit112ec12d8410960f9e0510d4afb8000af645bdc2
treea5162153475427a63ac79250127188d5ff61d601
parentb83c044dc6b39e50f2d845b052b3c586e479a800
test: use the connectivity state watcher API (#8708)

The current tests are using an LB policy to record the state transitions
of subchannels. But these tests are meant to test the connectivity state
transitions of the channel.

Also, in a follow-up PR I will be making the change to transition the
channel to CONNECTING as soon as it exits IDLE
(https://github.com/grpc/grpc-go/issues/7686). With that change, the
current test don't work anymore. So, we will have to change these tests
anyway.

So, I took the opportunity to clean up them and use the connectivity
state watcher API to record the state transitions of the grpc channel
and compare them against the expected states.

RELEASE NOTES: none
test/clientconn_state_transition_test.go