@@ -20,7 +20,6 @@ package test
2020
2121import (
2222 "context"
23- "errors"
2423 "fmt"
2524 "io"
2625 "net"
@@ -576,8 +575,8 @@ func (s) TestMaxCallAttempts(t *testing.T) {
576575 t .Fatalf ("client: Recv() = %s, %v; want <nil>, error" , got , err )
577576 } else if status .Code (err ) != codes .Unavailable {
578577 t .Fatalf ("client: Recv() = _, %v; want _, Unavailable" , err )
579- } else if ! errors . Is (err , grpc . ErrRetriesExhausted ) {
580- t .Fatalf ("want: ErrRetriesExhausted , got: %v" , err )
578+ } else if ! strings . Contains (err . Error (), "retries exhausted" ) {
579+ t .Fatalf ("want: retries exhausted , got: %v" , err )
581580 }
582581
583582 serverMu .Lock ()
@@ -910,8 +909,8 @@ func (s) TestNoRetry(t *testing.T) {
910909 if status .Code (err ) != codes .Unavailable {
911910 t .Fatalf ("client: Recv() = _, %v; want _, Unavailable" , err )
912911 }
913- if errors . Is (err , grpc . ErrRetriesExhausted ) {
914- t .Fatalf ("client: Recv () error matches ErrRetriesExhausted, want not match" )
912+ if strings . Contains (err . Error (), "retries exhausted" ) {
913+ t .Fatalf ("client: EmptyCall () failed with an unexpected 'retries exhausted' error: %v" , err )
915914 }
916915
917916 // Test unary RPC
@@ -922,8 +921,9 @@ func (s) TestNoRetry(t *testing.T) {
922921 if status .Code (err ) != codes .Unavailable {
923922 t .Fatalf ("client: EmptyCall() = _, %v; want _, Unavailable" , err )
924923 }
925- if errors .Is (err , grpc .ErrRetriesExhausted ) {
926- t .Fatalf ("client: EmptyCall() error matches ErrRetriesExhausted, want not match" )
924+
925+ if strings .Contains (err .Error (), "retries exhausted" ) {
926+ t .Fatalf ("client: EmptyCall() failed with an unexpected 'retries exhausted' error: %v" , err )
927927 }
928928 })
929929 }
0 commit comments