(t *testing.T)
| 1470 | } |
| 1471 | |
| 1472 | func (s) TestGRPCLBStatsUnaryDrop(t *testing.T) { |
| 1473 | if err := runAndCheckStats(t, true, nil, func(cc *grpc.ClientConn) { |
| 1474 | testC := testgrpc.NewTestServiceClient(cc) |
| 1475 | ctx, cancel := context.WithTimeout(context.Background(), defaultFallbackTimeout) |
| 1476 | defer cancel() |
| 1477 | // The first non-failfast RPC succeeds, all connections are up. |
| 1478 | if _, err := testC.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); err != nil { |
| 1479 | t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) |
| 1480 | } |
| 1481 | for i := 0; i < countRPC-1; i++ { |
| 1482 | testC.EmptyCall(ctx, &testpb.Empty{}) |
| 1483 | } |
| 1484 | }, &rpcStats{ |
| 1485 | numCallsStarted: int64(countRPC), |
| 1486 | numCallsFinished: int64(countRPC), |
| 1487 | numCallsFinishedKnownReceived: int64(countRPC) / 2, |
| 1488 | numCallsDropped: map[string]int64{lbToken: int64(countRPC) / 2}, |
| 1489 | }); err != nil { |
| 1490 | t.Fatal(err) |
| 1491 | } |
| 1492 | } |
| 1493 | |
| 1494 | func (s) TestGRPCLBStatsUnaryFailedToSend(t *testing.T) { |
| 1495 | if err := runAndCheckStats(t, false, nil, func(cc *grpc.ClientConn) { |
nothing calls this directly
no test coverage detected