(c *rpcConfig)
| 301 | } |
| 302 | |
| 303 | func (te *test) doUnaryCall(c *rpcConfig) (*testpb.SimpleRequest, *testpb.SimpleResponse, error) { |
| 304 | var ( |
| 305 | resp *testpb.SimpleResponse |
| 306 | req *testpb.SimpleRequest |
| 307 | err error |
| 308 | ) |
| 309 | tCtx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) |
| 310 | defer cancel() |
| 311 | tc := testgrpc.NewTestServiceClient(te.clientConn(tCtx)) |
| 312 | if c.success { |
| 313 | req = &testpb.SimpleRequest{Payload: idToPayload(errorID + 1)} |
| 314 | } else { |
| 315 | req = &testpb.SimpleRequest{Payload: idToPayload(errorID)} |
| 316 | } |
| 317 | |
| 318 | resp, err = tc.UnaryCall(metadata.NewOutgoingContext(tCtx, testMetadata), req, grpc.WaitForReady(!c.failfast)) |
| 319 | return req, resp, err |
| 320 | } |
| 321 | |
| 322 | func (te *test) doFullDuplexCallRoundtrip(c *rpcConfig) ([]proto.Message, []proto.Message, error) { |
| 323 | var ( |
no test coverage detected