(t *testing.T)
| 1449 | ) |
| 1450 | |
| 1451 | func (s) TestGRPCLBStatsUnarySuccess(t *testing.T) { |
| 1452 | if err := runAndCheckStats(t, false, nil, func(cc *grpc.ClientConn) { |
| 1453 | testC := testgrpc.NewTestServiceClient(cc) |
| 1454 | ctx, cancel := context.WithTimeout(context.Background(), defaultFallbackTimeout) |
| 1455 | defer cancel() |
| 1456 | // The first non-failfast RPC succeeds, all connections are up. |
| 1457 | if _, err := testC.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); err != nil { |
| 1458 | t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) |
| 1459 | } |
| 1460 | for i := 0; i < countRPC-1; i++ { |
| 1461 | testC.EmptyCall(ctx, &testpb.Empty{}) |
| 1462 | } |
| 1463 | }, &rpcStats{ |
| 1464 | numCallsStarted: int64(countRPC), |
| 1465 | numCallsFinished: int64(countRPC), |
| 1466 | numCallsFinishedKnownReceived: int64(countRPC), |
| 1467 | }); err != nil { |
| 1468 | t.Fatal(err) |
| 1469 | } |
| 1470 | } |
| 1471 | |
| 1472 | func (s) TestGRPCLBStatsUnaryDrop(t *testing.T) { |
| 1473 | if err := runAndCheckStats(t, true, nil, func(cc *grpc.ClientConn) { |
nothing calls this directly
no test coverage detected