(ctx context.Context, t *testing.T, tc testgrpc.TestServiceClient, want *v3orcapb.OrcaLoadReport)
| 348 | } |
| 349 | |
| 350 | func pollORCAResult(ctx context.Context, t *testing.T, tc testgrpc.TestServiceClient, want *v3orcapb.OrcaLoadReport) { |
| 351 | t.Helper() |
| 352 | for ; ctx.Err() == nil; <-time.After(time.Second) { |
| 353 | orcaRes := &v3orcapb.OrcaLoadReport{} |
| 354 | if _, err := tc.UnaryCall(contextWithORCAResult(ctx, &orcaRes), &testpb.SimpleRequest{}); err != nil { |
| 355 | t.Fatalf("UnaryCall failed: %v", err) |
| 356 | } |
| 357 | if diff := cmp.Diff(orcaRes, want, protocmp.Transform()); diff == "" { |
| 358 | return |
| 359 | } |
| 360 | t.Logf("ORCA load report = %v; want %v; retrying...", orcaRes, want) |
| 361 | } |
| 362 | t.Fatalf("Timed out waiting for expected ORCA load report %v", want) |
| 363 | } |
no test coverage detected