diff --git a/reflection/serverreflection_test.go b/reflection/serverreflection_test.go index daef8ff69e62..13b05b627733 100644 --- a/reflection/serverreflection_test.go +++ b/reflection/serverreflection_test.go @@ -94,7 +94,7 @@ func TestFileDescForType(t *testing.T) { {reflect.TypeOf(pb.ToBeExtended{}), fdProto2}, } { fd, err := s.fileDescForType(test.st) - if err != nil || !reflect.DeepEqual(fd, test.wantFd) { + if err != nil || !proto.Equal(fd, test.wantFd) { t.Errorf("fileDescForType(%q) = %q, %v, want %q, ", test.st, fd, err, test.wantFd) } } @@ -138,7 +138,7 @@ func TestFileDescContainingExtension(t *testing.T) { {reflect.TypeOf(pb.ToBeExtended{}), 29, fdProto2Ext2}, } { fd, err := s.fileDescContainingExtension(test.st, test.extNum) - if err != nil || !reflect.DeepEqual(fd, test.want) { + if err != nil || !proto.Equal(fd, test.want) { t.Errorf("fileDescContainingExtension(%q) = %q, %v, want %q, ", test.st, fd, err, test.want) } } diff --git a/status/status_test.go b/status/status_test.go index a47746bf1ea9..236787435dd1 100644 --- a/status/status_test.go +++ b/status/status_test.go @@ -37,6 +37,7 @@ import ( "reflect" "testing" + "github.com/golang/protobuf/proto" apb "github.com/golang/protobuf/ptypes/any" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" @@ -59,7 +60,7 @@ func TestFromToProto(t *testing.T) { } err := FromProto(s) - if got := err.Proto(); !reflect.DeepEqual(s, got) { + if got := err.Proto(); !proto.Equal(s, got) { t.Fatalf("Expected errors to be identical - s: %v got: %v", s, got) } }