aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/util')
-rw-r--r--test/cpp/util/benchmark_config.cc14
-rw-r--r--test/cpp/util/byte_buffer_test.cc3
-rw-r--r--test/cpp/util/cli_call.cc2
-rw-r--r--test/cpp/util/echo.proto6
-rw-r--r--test/cpp/util/echo_duplicate.proto2
-rw-r--r--test/cpp/util/messages.proto30
6 files changed, 31 insertions, 26 deletions
diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc
index 91fbbf9677..3c38221b4c 100644
--- a/test/cpp/util/benchmark_config.cc
+++ b/test/cpp/util/benchmark_config.cc
@@ -37,7 +37,8 @@
DEFINE_bool(enable_log_reporter, true,
"Enable reporting of benchmark results through GprLog");
-DEFINE_bool(report_metrics_db, false, "True if metrics to be reported to performance database");
+DEFINE_bool(report_metrics_db, false,
+ "True if metrics to be reported to performance database");
DEFINE_string(hashed_id, "", "Hash of the user id");
@@ -45,7 +46,8 @@ DEFINE_string(test_name, "", "Name of the test being executed");
DEFINE_string(sys_info, "", "System information");
-DEFINE_string(server_address, "localhost:50052", "Address of the performance database server");
+DEFINE_string(server_address, "localhost:50052",
+ "Address of the performance database server");
DEFINE_string(tag, "", "Optional tag for the test");
@@ -69,10 +71,10 @@ static std::shared_ptr<Reporter> InitBenchmarkReporters() {
composite_reporter->add(
std::unique_ptr<Reporter>(new GprLogReporter("LogReporter")));
}
- if(FLAGS_report_metrics_db) {
- composite_reporter->add(
- std::unique_ptr<Reporter>(new PerfDbReporter("PerfDbReporter", FLAGS_hashed_id, FLAGS_test_name,
- FLAGS_sys_info, FLAGS_server_address, FLAGS_tag)));
+ if (FLAGS_report_metrics_db) {
+ composite_reporter->add(std::unique_ptr<Reporter>(
+ new PerfDbReporter("PerfDbReporter", FLAGS_hashed_id, FLAGS_test_name,
+ FLAGS_sys_info, FLAGS_server_address, FLAGS_tag)));
}
return std::shared_ptr<Reporter>(composite_reporter);
diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc
index 13eb49730a..5195575f99 100644
--- a/test/cpp/util/byte_buffer_test.cc
+++ b/test/cpp/util/byte_buffer_test.cc
@@ -46,8 +46,7 @@ namespace {
const char* kContent1 = "hello xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char* kContent2 = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy world";
-class ByteBufferTest : public ::testing::Test {
-};
+class ByteBufferTest : public ::testing::Test {};
TEST_F(ByteBufferTest, CreateFromSingleSlice) {
gpr_slice hello = gpr_slice_from_copied_string(kContent1);
diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc
index 83a7a1744a..ac88910a01 100644
--- a/test/cpp/util/cli_call.cc
+++ b/test/cpp/util/cli_call.cc
@@ -49,7 +49,7 @@
namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)(gpr_intptr) i; }
+void* tag(int i) { return (void*)(gpr_intptr)i; }
} // namespace
Status CliCall::Call(std::shared_ptr<grpc::ChannelInterface> channel,
diff --git a/test/cpp/util/echo.proto b/test/cpp/util/echo.proto
index 58ec680ecd..8ea2f59897 100644
--- a/test/cpp/util/echo.proto
+++ b/test/cpp/util/echo.proto
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-syntax = "proto2";
+syntax = "proto3";
import "test/cpp/util/messages.proto";
@@ -41,3 +41,7 @@ service TestService {
rpc BidiStream(stream EchoRequest) returns (stream EchoResponse);
rpc Unimplemented(EchoRequest) returns (EchoResponse);
}
+
+service UnimplementedService {
+ rpc Unimplemented(EchoRequest) returns (EchoResponse);
+}
diff --git a/test/cpp/util/echo_duplicate.proto b/test/cpp/util/echo_duplicate.proto
index e54c016d2f..9c1d67825a 100644
--- a/test/cpp/util/echo_duplicate.proto
+++ b/test/cpp/util/echo_duplicate.proto
@@ -30,7 +30,7 @@
// This is a partial copy of echo.proto with a different package name.
-syntax = "proto2";
+syntax = "proto3";
import "test/cpp/util/messages.proto";
diff --git a/test/cpp/util/messages.proto b/test/cpp/util/messages.proto
index 24e199b809..359d1db74f 100644
--- a/test/cpp/util/messages.proto
+++ b/test/cpp/util/messages.proto
@@ -28,32 +28,32 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-syntax = "proto2";
+syntax = "proto3";
package grpc.cpp.test.util;
message RequestParams {
- optional bool echo_deadline = 1;
- optional int32 client_cancel_after_us = 2;
- optional int32 server_cancel_after_us = 3;
- optional bool echo_metadata = 4;
- optional bool check_auth_context = 5;
- optional int32 response_message_length = 6;
- optional bool echo_peer = 7;
+ bool echo_deadline = 1;
+ int32 client_cancel_after_us = 2;
+ int32 server_cancel_after_us = 3;
+ bool echo_metadata = 4;
+ bool check_auth_context = 5;
+ int32 response_message_length = 6;
+ bool echo_peer = 7;
}
message EchoRequest {
- optional string message = 1;
- optional RequestParams param = 2;
+ string message = 1;
+ RequestParams param = 2;
}
message ResponseParams {
- optional int64 request_deadline = 1;
- optional string host = 2;
- optional string peer = 3;
+ int64 request_deadline = 1;
+ string host = 2;
+ string peer = 3;
}
message EchoResponse {
- optional string message = 1;
- optional ResponseParams param = 2;
+ string message = 1;
+ ResponseParams param = 2;
}