setupBackends spins up three test backends, each listening on a port on localhost. The three backends always reply with an empty response with no error, and for streaming receive until hitting an EOF error.
(t *testing.T, numBackends int)
| 146 | // localhost. The three backends always reply with an empty response with no |
| 147 | // error, and for streaming receive until hitting an EOF error. |
| 148 | func setupBackends(t *testing.T, numBackends int) []string { |
| 149 | t.Helper() |
| 150 | addresses := make([]string, numBackends) |
| 151 | backends := startBackends(t, numBackends) |
| 152 | // Construct and start working backends. |
| 153 | for i := 0; i < numBackends; i++ { |
| 154 | addresses[i] = backends[i].Address |
| 155 | } |
| 156 | return addresses |
| 157 | } |
| 158 | |
| 159 | // checkRoundRobinRPCs verifies that EmptyCall RPCs on the given ClientConn, |
| 160 | // connected to a server exposing the test.grpc_testing.TestService, are |
no test coverage detected