(t *testing.T)
| 1492 | } |
| 1493 | |
| 1494 | func (s) TestGRPCLBStatsUnaryFailedToSend(t *testing.T) { |
| 1495 | if err := runAndCheckStats(t, false, nil, func(cc *grpc.ClientConn) { |
| 1496 | testC := testgrpc.NewTestServiceClient(cc) |
| 1497 | ctx, cancel := context.WithTimeout(context.Background(), defaultFallbackTimeout) |
| 1498 | defer cancel() |
| 1499 | // The first non-failfast RPC succeeds, all connections are up. |
| 1500 | if _, err := testC.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); err != nil { |
| 1501 | t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) |
| 1502 | } |
| 1503 | for i := 0; i < countRPC-1; i++ { |
| 1504 | cc.Invoke(ctx, failtosendURI, &testpb.Empty{}, nil) |
| 1505 | } |
| 1506 | }, &rpcStats{ |
| 1507 | numCallsStarted: int64(countRPC), |
| 1508 | numCallsFinished: int64(countRPC), |
| 1509 | numCallsFinishedWithClientFailedToSend: int64(countRPC) - 1, |
| 1510 | numCallsFinishedKnownReceived: 1, |
| 1511 | }); err != nil { |
| 1512 | t.Fatal(err) |
| 1513 | } |
| 1514 | } |
| 1515 | |
| 1516 | func (s) TestGRPCLBStatsStreamingSuccess(t *testing.T) { |
| 1517 | if err := runAndCheckStats(t, false, nil, func(cc *grpc.ClientConn) { |
nothing calls this directly
no test coverage detected