(c *rpcConfig)
| 295 | } |
| 296 | |
| 297 | func (te *test) doUnaryCall(c *rpcConfig) (*testpb.SimpleRequest, *testpb.SimpleResponse, error) { |
| 298 | var ( |
| 299 | resp *testpb.SimpleResponse |
| 300 | req *testpb.SimpleRequest |
| 301 | err error |
| 302 | ) |
| 303 | tc := testgrpc.NewTestServiceClient(te.ss.CC) |
| 304 | if c.success { |
| 305 | req = &testpb.SimpleRequest{Payload: idToPayload(errorID + 1)} |
| 306 | } else { |
| 307 | req = &testpb.SimpleRequest{Payload: idToPayload(errorID)} |
| 308 | } |
| 309 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| 310 | defer cancel() |
| 311 | ctx = metadata.NewOutgoingContext(ctx, testMetadata) |
| 312 | |
| 313 | resp, err = tc.UnaryCall(ctx, req) |
| 314 | return req, resp, err |
| 315 | } |
| 316 | |
| 317 | func (te *test) doFullDuplexCallRoundtrip(c *rpcConfig) ([]proto.Message, []proto.Message, error) { |
| 318 | var ( |
no test coverage detected