diff --git a/compiler/src/test/proto/test.proto b/compiler/src/test/proto/test.proto index c448036278..ba4938df9e 100644 --- a/compiler/src/test/proto/test.proto +++ b/compiler/src/test/proto/test.proto @@ -1,5 +1,5 @@ // A simple service definition for testing the protoc plugin. -syntax = "proto2"; +syntax = "proto3"; package grpc.testing; diff --git a/integration-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java b/integration-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java index ed89eb8668..0261d14201 100644 --- a/integration-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java +++ b/integration-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java @@ -129,10 +129,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService { @Override public void onValue(StreamingInputCallRequest message) { - Payload payload = message.getPayload(); - if (payload.hasBody()) { - totalPayloadSize += payload.getBody().size(); - } + totalPayloadSize += message.getPayload().getBody().size(); } @Override @@ -320,8 +317,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService { int offset = 0; boolean compressable = compressableResponse(request.getResponseType()); for (ResponseParameters params : request.getResponseParametersList()) { - int interval = params.hasIntervalUs() ? params.getIntervalUs() : 0; - chunkQueue.add(new Chunk(interval, offset, params.getSize(), compressable)); + chunkQueue.add(new Chunk(params.getIntervalUs(), offset, params.getSize(), compressable)); // Increment the offset past this chunk. // Both buffers need to be circular. diff --git a/integration-testing/src/main/proto/io/grpc/testing/integration/message_set.proto b/integration-testing/src/main/proto/io/grpc/testing/integration/message_set.proto deleted file mode 100644 index bca0ec25ce..0000000000 --- a/integration-testing/src/main/proto/io/grpc/testing/integration/message_set.proto +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2014 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd -syntax = "proto2"; - -package proto2.bridge; - -option java_outer_classname = "MessageSetProtos"; -option java_multiple_files = true; -option java_generate_equals_and_hash = true; - -message MessageSet { - option message_set_wire_format = true; - extensions 4 to max; -} - diff --git a/integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto b/integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto index 52e2e53b3c..471d837557 100644 --- a/integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto +++ b/integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto @@ -4,12 +4,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -syntax = "proto2"; +syntax = "proto3"; package stubby.testing; -import "io/grpc/testing/integration/message_set.proto"; - option java_package = "io.grpc.testing.integration"; // The type of payload that should be returned. @@ -56,10 +54,6 @@ message SimpleResponse { } message SimpleContext { - // Register MessageSet extension. - extend proto2.bridge.MessageSet { - optional SimpleContext message_set_extension = 71139615; - } optional string value = 1; }