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

Struct testServer

balancer/pickfirst/pickfirst_ext_test.go:1139–1142  ·  view source on GitHub ↗

testServer is a server than can be stopped and resumed without closing the listener. This guarantees the same port number (and address) is used after restart. When a server is stopped, it accepts and closes all tcp connections from clients.

Source from the content-addressed store, hash-verified

1137// after restart. When a server is stopped, it accepts and closes all tcp
1138// connections from clients.
1139type testServer struct {
1140 stubserver.StubServer
1141 lis *testutils.RestartableListener
1142}
1143
1144func (s *testServer) stop() {
1145 s.lis.Stop()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected