MCPcopy
hub / github.com/grpc/grpc-go / channelzSubChannel

Function channelzSubChannel

internal/transport/keepalive_test.go:273–281  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

271}
272
273func channelzSubChannel(t *testing.T) *channelz.SubChannel {
274 ch := channelz.RegisterChannel(nil, "test chan")
275 sc := channelz.RegisterSubChannel(ch, "test subchan")
276 t.Cleanup(func() {
277 channelz.RemoveEntry(sc.ID)
278 channelz.RemoveEntry(ch.ID)
279 })
280 return sc
281}
282
283// TestKeepaliveClientClosesUnresponsiveServer creates a server which does not
284// respond to keepalive pings, and makes sure that the client closes the

Calls 3

RegisterChannelFunction · 0.92
RegisterSubChannelFunction · 0.92
RemoveEntryFunction · 0.92

Tested by

no test coverage detected