gofmt on end2end_test.go

This commit is contained in:
iamqizhao
2015-02-11 19:05:22 -08:00
parent 9c9eb38d0d
commit 2b6078284c

View File

@ -248,7 +248,7 @@ func TestLargeUnary(t *testing.T) {
req := &testpb.SimpleRequest{ req := &testpb.SimpleRequest{
ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(), ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(),
ResponseSize: proto.Int32(int32(respSize)), ResponseSize: proto.Int32(int32(respSize)),
Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)) , Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)),
} }
reply, err := tc.UnaryCall(context.Background(), req) reply, err := tc.UnaryCall(context.Background(), req)
if err != nil { if err != nil {
@ -269,7 +269,7 @@ func TestMetadataUnaryRPC(t *testing.T) {
req := &testpb.SimpleRequest{ req := &testpb.SimpleRequest{
ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(), ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(),
ResponseSize: proto.Int32(int32(respSize)), ResponseSize: proto.Int32(int32(respSize)),
Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)) , Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)),
} }
var header, trailer metadata.MD var header, trailer metadata.MD
ctx := metadata.NewContext(context.Background(), testMetadata) ctx := metadata.NewContext(context.Background(), testMetadata)
@ -291,7 +291,7 @@ func performOneRPC(t *testing.T, tc testpb.TestServiceClient, wg *sync.WaitGroup
req := &testpb.SimpleRequest{ req := &testpb.SimpleRequest{
ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(), ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(),
ResponseSize: proto.Int32(int32(respSize)), ResponseSize: proto.Int32(int32(respSize)),
Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)) , Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)),
} }
reply, err := tc.UnaryCall(context.Background(), req) reply, err := tc.UnaryCall(context.Background(), req)
if err != nil { if err != nil {
@ -339,7 +339,7 @@ func TestTimeout(t *testing.T) {
req := &testpb.SimpleRequest{ req := &testpb.SimpleRequest{
ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(), ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(),
ResponseSize: proto.Int32(int32(respSize)), ResponseSize: proto.Int32(int32(respSize)),
Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)) , Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)),
} }
// Performs 100 RPCs with various timeout values so that // Performs 100 RPCs with various timeout values so that
// the RPCs could timeout on different stages of their lifetime. This // the RPCs could timeout on different stages of their lifetime. This
@ -361,7 +361,7 @@ func TestCancel(t *testing.T) {
req := &testpb.SimpleRequest{ req := &testpb.SimpleRequest{
ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(), ResponseType: testpb.PayloadType_COMPRESSABLE.Enum(),
ResponseSize: proto.Int32(int32(respSize)), ResponseSize: proto.Int32(int32(respSize)),
Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)) , Payload: newPayload(testpb.PayloadType_COMPRESSABLE, int32(argSize)),
} }
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
time.AfterFunc(1*time.Millisecond, cancel) time.AfterFunc(1*time.Millisecond, cancel)