Skip to content

Commit

Permalink
test: speed up test that was taking 10 seconds to timeout (#6531)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley authored Aug 9, 2023
1 parent 694cb64 commit 3fa17cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/creds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ func (s) TestWaitForReadyRPCErrorOnBadCertificates(t *testing.T) {
defer cc.Close()

tc := testgrpc.NewTestServiceClient(cc)
if _, err = tc.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); strings.Contains(err.Error(), clientAlwaysFailCredErrorMsg) {
return
ctx, cancel = context.WithTimeout(context.Background(), defaultTestShortTimeout)
defer cancel()
if _, err = tc.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)); !strings.Contains(err.Error(), clientAlwaysFailCredErrorMsg) {
t.Fatalf("TestService/EmptyCall(_, _) = _, %v, want err.Error() contains %q", err, clientAlwaysFailCredErrorMsg)
}
te.t.Fatalf("TestService/EmptyCall(_, _) = _, %v, want err.Error() contains %q", err, clientAlwaysFailCredErrorMsg)
}

var (
Expand Down

0 comments on commit 3fa17cc

Please sign in to comment.