(t *testing.T, e env)
| 422 | } |
| 423 | |
| 424 | func testConcurrentClientConnCloseAndServerGoAway(t *testing.T, e env) { |
| 425 | te := newTest(t, e) |
| 426 | te.userAgent = testAppUA |
| 427 | te.declareLogNoise( |
| 428 | "transport: http2Client.notifyError got notified that the client transport was broken EOF", |
| 429 | "grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing", |
| 430 | "grpc: addrConn.resetTransport failed to create client transport: connection error", |
| 431 | ) |
| 432 | te.startServer(&testServer{security: e.security}) |
| 433 | defer te.tearDown() |
| 434 | |
| 435 | cc := te.clientConn() |
| 436 | tc := testgrpc.NewTestServiceClient(cc) |
| 437 | ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) |
| 438 | defer cancel() |
| 439 | if _, err := tc.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); err != nil { |
| 440 | t.Fatalf("%v.EmptyCall(_, _, _) = _, %v, want _, <nil>", tc, err) |
| 441 | } |
| 442 | ch := make(chan struct{}) |
| 443 | // Close ClientConn and Server concurrently. |
| 444 | go func() { |
| 445 | te.srv.GracefulStop() |
| 446 | close(ch) |
| 447 | }() |
| 448 | go func() { |
| 449 | cc.Close() |
| 450 | }() |
| 451 | <-ch |
| 452 | } |
| 453 | |
| 454 | func (s) TestConcurrentServerStopAndGoAway(t *testing.T) { |
| 455 | for _, e := range listTestEnv() { |
no test coverage detected