newTest returns a new test using the provided testing.T and environment. It is returned with default values. Tests should modify it before calling its startServer and clientConn methods.
(t *testing.T, e env)
| 564 | // environment. It is returned with default values. Tests should |
| 565 | // modify it before calling its startServer and clientConn methods. |
| 566 | func newTest(t *testing.T, e env) *test { |
| 567 | te := &test{ |
| 568 | t: t, |
| 569 | e: e, |
| 570 | maxStream: math.MaxUint32, |
| 571 | } |
| 572 | te.ctx, te.cancel = context.WithTimeout(context.Background(), defaultTestTimeout) |
| 573 | return te |
| 574 | } |
| 575 | |
| 576 | func (te *test) listenAndServe(ts testgrpc.TestServiceServer, listen func(network, address string) (net.Listener, error)) net.Listener { |
| 577 | te.t.Helper() |
no outgoing calls
no test coverage detected