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

Function newTest

test/end2end_test.go:566–574  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

564// environment. It is returned with default values. Tests should
565// modify it before calling its startServer and clientConn methods.
566func 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
576func (te *test) listenAndServe(ts testgrpc.TestServiceServer, listen func(network, address string) (net.Listener, error)) net.Listener {
577 te.t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected