chore: refactor errors to use errors.Is (#3654)
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/load"
|
||||
"github.com/zeromicro/go-zero/core/stat"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func TestUnarySheddingInterceptor(t *testing.T) {
|
||||
@@ -33,7 +35,7 @@ func TestUnarySheddingInterceptor(t *testing.T) {
|
||||
name: "reject",
|
||||
allow: false,
|
||||
handleErr: nil,
|
||||
expect: load.ErrServiceOverloaded,
|
||||
expect: status.Error(codes.ResourceExhausted, load.ErrServiceOverloaded.Error()),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user