Skip to content

Commit

Permalink
Vet
Browse files Browse the repository at this point in the history
  • Loading branch information
zasweq committed Dec 21, 2023
1 parent 4db73e0 commit 7d784f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/xds/xds_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (s) TestServeLDSRDS(t *testing.T) {
// waitForFailedRPCWithStatusCode makes Unary RPC's until it receives the
// expected status in a polling manner. Fails if the RPC made does not return
// the expected status before the context expires.
func waitForFailedRPCWithStatusCode(ctx context.Context, t *testing.T, cc *grpc.ClientConn, st ...*status.Status) {
func waitForFailedRPCWithStatusCode(ctx context.Context, t *testing.T, cc *grpc.ClientConn, sts ...*status.Status) {
t.Helper()

c := testgrpc.NewTestServiceClient(cc)
Expand All @@ -150,9 +150,12 @@ func waitForFailedRPCWithStatusCode(ctx context.Context, t *testing.T, cc *grpc.
case <-ctx.Done():
t.Fatalf("failure when waiting for RPCs to fail with certain status %v: %v. most recent error received from RPC: %v", st, ctx.Err(), err.Error())

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / upload

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21)

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, -race)

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, 386)

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, arm64)

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.20)

undefined: st

Check failure on line 151 in test/xds/xds_server_test.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.19)

undefined: st
case <-ticker.C:
if _, err = c.EmptyCall(ctx, &testpb.Empty{}); status.Code(err) == st.Code() && strings.Contains(err.Error(), st.Message()) {
t.Logf("most recent error happy case: %v", err.Error())
return
_, err = c.EmptyCall(ctx, &testpb.Empty{})
for _, st := range sts {
if status.Code(err) == st.Code() && strings.Contains(err.Error(), st.Message()) {
t.Logf("most recent error happy case: %v", err.Error())
return
}
}
}
}
Expand Down

0 comments on commit 7d784f1

Please sign in to comment.