Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions encoding/proto/proto_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/golang/protobuf/proto"
"google.golang.org/grpc/encoding"
"google.golang.org/grpc/test/codec_perf"
pb "google.golang.org/grpc/test/codec_perf"
)

func setupBenchmarkProtoCodecInputs(payloadBaseSize uint32) []proto.Message {
Expand All @@ -40,7 +40,7 @@ func setupBenchmarkProtoCodecInputs(payloadBaseSize uint32) []proto.Message {
protoStructs := make([]proto.Message, 0)

for _, p := range payloadSuffixes {
ps := &codec_perf.Buffer{}
ps := &pb.Buffer{}
ps.Body = append(payloadBase, p...)
protoStructs = append(protoStructs, ps)
}
Expand Down Expand Up @@ -91,7 +91,7 @@ func fastMarshalAndUnmarshal(codec encoding.Codec, protoStruct proto.Message, b
if err != nil {
b.Errorf("codec.Marshal(_) returned an error")
}
res := codec_perf.Buffer{}
res := pb.Buffer{}
if err := codec.Unmarshal(marshaledBytes, &res); err != nil {
b.Errorf("codec.Unmarshal(_) returned an error")
}
Expand Down
8 changes: 4 additions & 4 deletions encoding/proto/proto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (

"google.golang.org/grpc/encoding"
"google.golang.org/grpc/internal/grpctest"
"google.golang.org/grpc/test/codec_perf"
pb "google.golang.org/grpc/test/codec_perf"
)

func marshalAndUnmarshal(t *testing.T, codec encoding.Codec, expectedBody []byte) {
p := &codec_perf.Buffer{}
p := &pb.Buffer{}
p.Body = expectedBody

marshalledBytes, err := codec.Marshal(p)
Expand Down Expand Up @@ -99,8 +99,8 @@ func (s) TestStaggeredMarshalAndUnmarshalUsingSamePool(t *testing.T) {
expectedBody1 := []byte{1, 2, 3}
expectedBody2 := []byte{4, 5, 6}

proto1 := codec_perf.Buffer{Body: expectedBody1}
proto2 := codec_perf.Buffer{Body: expectedBody2}
proto1 := pb.Buffer{Body: expectedBody1}
proto2 := pb.Buffer{Body: expectedBody2}

var m1, m2 []byte
var err error
Expand Down