aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2015-08-18 11:05:49 -0700
committerGravatar David G. Quintas <dgq@google.com>2015-08-18 11:05:49 -0700
commit4f21d3549c8f652a152ae086a74dd8415ecca8fa (patch)
treed8dae211eb45035d095e4549ab5af439e67b22dc /test/cpp
parentbb1c795f998f052f854a6e1aeebff44e293a29f4 (diff)
parentd6c98df792198c5c9687ed35a676efbc5e621e0f (diff)
Merge pull request #2971 from ctiller/wtf-happened-to-our-formatting
clang-format all source
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/common/auth_property_iterator_test.cc7
-rw-r--r--test/cpp/common/secure_auth_context_test.cc2
-rw-r--r--test/cpp/end2end/async_end2end_test.cc47
-rw-r--r--test/cpp/end2end/client_crash_test.cc7
-rw-r--r--test/cpp/end2end/client_crash_test_server.cc3
-rw-r--r--test/cpp/end2end/end2end_test.cc12
-rw-r--r--test/cpp/end2end/generic_end2end_test.cc5
-rw-r--r--test/cpp/end2end/server_crash_test_client.cc4
-rw-r--r--test/cpp/end2end/zookeeper_test.cc5
-rw-r--r--test/cpp/interop/client_helper.h1
-rw-r--r--test/cpp/interop/interop_client.cc21
-rw-r--r--test/cpp/qps/perf_db_client.cc13
-rw-r--r--test/cpp/qps/perf_db_client.h5
-rw-r--r--test/cpp/qps/qps_interarrival_test.cc2
-rw-r--r--test/cpp/qps/qps_openloop_test.cc4
-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
18 files changed, 76 insertions, 81 deletions
diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc
index 74b18ced0d..bf17842a84 100644
--- a/test/cpp/common/auth_property_iterator_test.cc
+++ b/test/cpp/common/auth_property_iterator_test.cc
@@ -61,11 +61,8 @@ class AuthPropertyIteratorTest : public ::testing::Test {
EXPECT_EQ(1,
grpc_auth_context_set_peer_identity_property_name(ctx_, "name"));
}
- void TearDown() GRPC_OVERRIDE {
- grpc_auth_context_release(ctx_);
- }
+ void TearDown() GRPC_OVERRIDE { grpc_auth_context_release(ctx_); }
grpc_auth_context* ctx_;
-
};
TEST_F(AuthPropertyIteratorTest, DefaultCtor) {
@@ -100,7 +97,7 @@ TEST_F(AuthPropertyIteratorTest, GeneralTest) {
} // namespace
} // namespace grpc
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc
index 075d4ce8c9..e0376c9cc7 100644
--- a/test/cpp/common/secure_auth_context_test.cc
+++ b/test/cpp/common/secure_auth_context_test.cc
@@ -101,7 +101,7 @@ TEST_F(SecureAuthContextTest, Iterators) {
} // namespace
} // namespace grpc
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index f00d19ed6c..a30c841216 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -65,7 +65,7 @@ namespace testing {
namespace {
-void* tag(int i) { return (void*)(gpr_intptr) i; }
+void* tag(int i) { return (void*)(gpr_intptr)i; }
class Verifier {
public:
@@ -73,7 +73,7 @@ class Verifier {
expectations_[tag(i)] = expect_ok;
return *this;
}
- void Verify(CompletionQueue *cq) {
+ void Verify(CompletionQueue* cq) {
GPR_ASSERT(!expectations_.empty());
while (!expectations_.empty()) {
bool ok;
@@ -85,16 +85,19 @@ class Verifier {
expectations_.erase(it);
}
}
- void Verify(CompletionQueue *cq, std::chrono::system_clock::time_point deadline) {
+ void Verify(CompletionQueue* cq,
+ std::chrono::system_clock::time_point deadline) {
if (expectations_.empty()) {
bool ok;
- void *got_tag;
- EXPECT_EQ(cq->AsyncNext(&got_tag, &ok, deadline), CompletionQueue::TIMEOUT);
+ void* got_tag;
+ EXPECT_EQ(cq->AsyncNext(&got_tag, &ok, deadline),
+ CompletionQueue::TIMEOUT);
} else {
while (!expectations_.empty()) {
bool ok;
- void *got_tag;
- EXPECT_EQ(cq->AsyncNext(&got_tag, &ok, deadline), CompletionQueue::GOT_EVENT);
+ void* got_tag;
+ EXPECT_EQ(cq->AsyncNext(&got_tag, &ok, deadline),
+ CompletionQueue::GOT_EVENT);
auto it = expectations_.find(got_tag);
EXPECT_TRUE(it != expectations_.end());
EXPECT_EQ(it->second, ok);
@@ -116,7 +119,8 @@ class AsyncEnd2endTest : public ::testing::Test {
server_address_ << "localhost:" << port;
// Setup server
ServerBuilder builder;
- builder.AddListeningPort(server_address_.str(), grpc::InsecureServerCredentials());
+ builder.AddListeningPort(server_address_.str(),
+ grpc::InsecureServerCredentials());
builder.RegisterAsyncService(&service_);
cq_ = builder.AddCompletionQueue();
server_ = builder.BuildAndStart();
@@ -153,8 +157,8 @@ class AsyncEnd2endTest : public ::testing::Test {
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
- service_.RequestEcho(&srv_ctx, &recv_request, &response_writer,
- cq_.get(), cq_.get(), tag(2));
+ service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
+ cq_.get(), tag(2));
Verifier().Expect(2, true).Verify(cq_.get());
EXPECT_EQ(send_request.message(), recv_request.message());
@@ -221,10 +225,12 @@ TEST_F(AsyncEnd2endTest, AsyncNextRpc) {
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- Verifier().Expect(3, true).Verify(cq_.get(), std::chrono::system_clock::time_point::max());
+ Verifier().Expect(3, true).Verify(
+ cq_.get(), std::chrono::system_clock::time_point::max());
response_reader->Finish(&recv_response, &recv_status, tag(4));
- Verifier().Expect(4, true).Verify(cq_.get(), std::chrono::system_clock::time_point::max());
+ Verifier().Expect(4, true).Verify(
+ cq_.get(), std::chrono::system_clock::time_point::max());
EXPECT_EQ(send_response.message(), recv_response.message());
EXPECT_TRUE(recv_status.ok());
@@ -247,8 +253,8 @@ TEST_F(AsyncEnd2endTest, SimpleClientStreaming) {
std::unique_ptr<ClientAsyncWriter<EchoRequest> > cli_stream(
stub_->AsyncRequestStream(&cli_ctx, &recv_response, cq_.get(), tag(1)));
- service_.RequestRequestStream(&srv_ctx, &srv_stream, cq_.get(),
- cq_.get(), tag(2));
+ service_.RequestRequestStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(),
+ tag(2));
Verifier().Expect(2, true).Expect(1, true).Verify(cq_.get());
@@ -350,8 +356,8 @@ TEST_F(AsyncEnd2endTest, SimpleBidiStreaming) {
std::unique_ptr<ClientAsyncReaderWriter<EchoRequest, EchoResponse> >
cli_stream(stub_->AsyncBidiStream(&cli_ctx, cq_.get(), tag(1)));
- service_.RequestBidiStream(&srv_ctx, &srv_stream, cq_.get(),
- cq_.get(), tag(2));
+ service_.RequestBidiStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(),
+ tag(2));
Verifier().Expect(1, true).Expect(2, true).Verify(cq_.get());
@@ -537,18 +543,17 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) {
std::pair<grpc::string, grpc::string> meta1("key1", "val1");
std::pair<grpc::string, grpc::string> meta2(
"key2-bin",
- grpc::string("\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc",
- 13));
+ grpc::string("\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13));
std::pair<grpc::string, grpc::string> meta3("key3", "val3");
std::pair<grpc::string, grpc::string> meta6(
"key4-bin",
grpc::string("\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d",
- 14));
+ 14));
std::pair<grpc::string, grpc::string> meta5("key5", "val5");
std::pair<grpc::string, grpc::string> meta4(
"key6-bin",
- grpc::string("\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee",
- 15));
+ grpc::string(
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", 15));
cli_ctx.AddMetadata(meta1.first, meta1.second);
cli_ctx.AddMetadata(meta2.first, meta2.second);
diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc
index 906f124c05..1c2a5c3a36 100644
--- a/test/cpp/end2end/client_crash_test.cc
+++ b/test/cpp/end2end/client_crash_test.cc
@@ -77,17 +77,14 @@ class CrashTest : public ::testing::Test {
addr_stream << "localhost:" << port;
auto addr = addr_stream.str();
server_.reset(new SubProcess({
- g_root + "/client_crash_test_server",
- "--address=" + addr,
+ g_root + "/client_crash_test_server", "--address=" + addr,
}));
GPR_ASSERT(server_);
return grpc::cpp::test::util::TestService::NewStub(
CreateChannel(addr, InsecureCredentials(), ChannelArguments()));
}
- void KillServer() {
- server_.reset();
- }
+ void KillServer() { server_.reset(); }
private:
std::unique_ptr<SubProcess> server_;
diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc
index 20808a0240..3fd8c2c2f9 100644
--- a/test/cpp/end2end/client_crash_test_server.cc
+++ b/test/cpp/end2end/client_crash_test_server.cc
@@ -58,7 +58,8 @@ using namespace gflags;
namespace grpc {
namespace testing {
-class ServiceImpl GRPC_FINAL : public ::grpc::cpp::test::util::TestService::Service {
+class ServiceImpl GRPC_FINAL
+ : public ::grpc::cpp::test::util::TestService::Service {
Status BidiStream(ServerContext* context,
ServerReaderWriter<EchoResponse, EchoRequest>* stream)
GRPC_OVERRIDE {
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 22af1fde6a..350b10726f 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -270,7 +270,7 @@ class End2endTest : public ::testing::TestWithParam<bool> {
// Setup server
ServerBuilder builder;
SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key,
- test_server1_cert};
+ test_server1_cert};
SslServerCredentialsOptions ssl_opts;
ssl_opts.pem_root_certs = "";
ssl_opts.pem_key_cert_pairs.push_back(pkcp);
@@ -295,8 +295,8 @@ class End2endTest : public ::testing::TestWithParam<bool> {
ChannelArguments args;
args.SetSslTargetNameOverride("foo.test.google.fr");
args.SetString(GRPC_ARG_SECONDARY_USER_AGENT_STRING, "end2end_test");
- channel_ = CreateChannel(server_address_.str(), SslCredentials(ssl_opts),
- args);
+ channel_ =
+ CreateChannel(server_address_.str(), SslCredentials(ssl_opts), args);
}
void ResetStub(bool use_proxy) {
@@ -874,7 +874,7 @@ TEST_P(End2endTest, HugeResponse) {
namespace {
void ReaderThreadFunc(ClientReaderWriter<EchoRequest, EchoResponse>* stream,
- gpr_event *ev) {
+ gpr_event* ev) {
EchoResponse resp;
gpr_event_set(ev, (void*)1);
while (stream->Read(&resp)) {
@@ -929,8 +929,8 @@ TEST_F(End2endTest, ChannelState) {
EXPECT_FALSE(ok);
EXPECT_EQ(GRPC_CHANNEL_IDLE, channel_->GetState(true));
- EXPECT_TRUE(channel_->WaitForStateChange(
- GRPC_CHANNEL_IDLE, gpr_inf_future(GPR_CLOCK_REALTIME)));
+ EXPECT_TRUE(channel_->WaitForStateChange(GRPC_CHANNEL_IDLE,
+ gpr_inf_future(GPR_CLOCK_REALTIME)));
EXPECT_EQ(GRPC_CHANNEL_CONNECTING, channel_->GetState(false));
}
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index b53c32144b..3120cec938 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -68,7 +68,7 @@ namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)(gpr_intptr) i; }
+void* tag(int i) { return (void*)(gpr_intptr)i; }
void verify_ok(CompletionQueue* cq, int i, bool expect_ok) {
bool ok;
@@ -107,7 +107,8 @@ class GenericEnd2endTest : public ::testing::Test {
server_address_ << server_host_ << ":" << port;
// Setup server
ServerBuilder builder;
- builder.AddListeningPort(server_address_.str(), InsecureServerCredentials());
+ builder.AddListeningPort(server_address_.str(),
+ InsecureServerCredentials());
builder.RegisterAsyncGenericService(&generic_service_);
srv_cq_ = builder.AddCompletionQueue();
server_ = builder.BuildAndStart();
diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc
index 497ccb4cb2..1da4f05c8d 100644
--- a/test/cpp/end2end/server_crash_test_client.cc
+++ b/test/cpp/end2end/server_crash_test_client.cc
@@ -60,8 +60,8 @@ using namespace gflags;
int main(int argc, char** argv) {
ParseCommandLineFlags(&argc, &argv, true);
- auto stub = grpc::cpp::test::util::TestService::NewStub(
- grpc::CreateChannel(FLAGS_address, grpc::InsecureCredentials(), grpc::ChannelArguments()));
+ auto stub = grpc::cpp::test::util::TestService::NewStub(grpc::CreateChannel(
+ FLAGS_address, grpc::InsecureCredentials(), grpc::ChannelArguments()));
EchoRequest request;
EchoResponse response;
diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc
index a48c497d9a..f5eba66cb2 100644
--- a/test/cpp/end2end/zookeeper_test.cc
+++ b/test/cpp/end2end/zookeeper_test.cc
@@ -89,8 +89,7 @@ class ZookeeperTest : public ::testing::Test {
RegisterService("/test/1", value);
// Registers service instance /test/2 in zookeeper
- value =
- "{\"host\":\"localhost\",\"port\":\"" + to_string(port2) + "\"}";
+ value = "{\"host\":\"localhost\",\"port\":\"" + to_string(port2) + "\"}";
RegisterService("/test/2", value);
}
@@ -196,7 +195,7 @@ TEST_F(ZookeeperTest, ZookeeperStateChangeTwoRpc) {
EXPECT_TRUE(s1.ok());
// Zookeeper state changes
- gpr_log(GPR_DEBUG, "Zookeeper state change");
+ gpr_log(GPR_DEBUG, "Zookeeper state change");
ChangeZookeeperState();
// Waits for re-resolving addresses
// TODO(ctiller): RPC will probably fail if not waiting
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index 1c7036d25d..28fca3266c 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -67,7 +67,6 @@ class InteropClientContextInspector {
const ::grpc::ClientContext& context_;
};
-
} // namespace testing
} // namespace grpc
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 27bb1d4725..ddf91aa5eb 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -134,13 +134,12 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request,
grpc::string(kLargeResponseSize, '\0'));
break;
case PayloadType::UNCOMPRESSABLE: {
- std::ifstream rnd_file(kRandomFile);
- GPR_ASSERT(rnd_file.good());
- for (int i = 0; i < kLargeResponseSize; i++) {
- GPR_ASSERT(response->payload().body()[i] == (char)rnd_file.get());
- }
+ std::ifstream rnd_file(kRandomFile);
+ GPR_ASSERT(rnd_file.good());
+ for (int i = 0; i < kLargeResponseSize; i++) {
+ GPR_ASSERT(response->payload().body()[i] == (char)rnd_file.get());
}
- break;
+ } break;
default:
GPR_ASSERT(false);
}
@@ -262,8 +261,8 @@ void InteropClient::DoLargeCompressedUnary() {
for (const auto compression_type : compression_types) {
char* log_suffix;
gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)",
- CompressionType_Name(compression_type).c_str(),
- PayloadType_Name(payload_type).c_str());
+ CompressionType_Name(compression_type).c_str(),
+ PayloadType_Name(payload_type).c_str());
gpr_log(GPR_INFO, "Sending a large compressed unary rpc %s.", log_suffix);
SimpleRequest request;
@@ -342,8 +341,8 @@ void InteropClient::DoResponseCompressedStreaming() {
char* log_suffix;
gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)",
- CompressionType_Name(compression_type).c_str(),
- PayloadType_Name(payload_type).c_str());
+ CompressionType_Name(compression_type).c_str(),
+ PayloadType_Name(payload_type).c_str());
gpr_log(GPR_INFO, "Receiving response steaming rpc %s.", log_suffix);
@@ -553,7 +552,7 @@ void InteropClient::DoStatusWithMessage() {
ClientContext context;
SimpleRequest request;
SimpleResponse response;
- EchoStatus *requested_status = request.mutable_response_status();
+ EchoStatus* requested_status = request.mutable_response_status();
requested_status->set_code(grpc::StatusCode::UNKNOWN);
grpc::string test_msg = "This is a test message";
requested_status->set_message(test_msg);
diff --git a/test/cpp/qps/perf_db_client.cc b/test/cpp/qps/perf_db_client.cc
index 08d20f0b8d..98efd8c3e3 100644
--- a/test/cpp/qps/perf_db_client.cc
+++ b/test/cpp/qps/perf_db_client.cc
@@ -44,9 +44,7 @@ void PerfDbClient::setConfigs(const ClientConfig& client_config,
}
// sets the QPS
-void PerfDbClient::setQps(double qps) {
- qps_ = qps;
-}
+void PerfDbClient::setQps(double qps) { qps_ = qps; }
// sets the QPS per core
void PerfDbClient::setQpsPerCore(double qps_per_core) {
@@ -54,10 +52,8 @@ void PerfDbClient::setQpsPerCore(double qps_per_core) {
}
// sets the 50th, 90th, 95th, 99th and 99.9th percentile latency
-void PerfDbClient::setLatencies(double perc_lat_50,
- double perc_lat_90,
- double perc_lat_95,
- double perc_lat_99,
+void PerfDbClient::setLatencies(double perc_lat_50, double perc_lat_90,
+ double perc_lat_95, double perc_lat_99,
double perc_lat_99_point_9) {
perc_lat_50_ = perc_lat_50;
perc_lat_90_ = perc_lat_90;
@@ -68,7 +64,8 @@ void PerfDbClient::setLatencies(double perc_lat_50,
// sets the server and client, user and system times
void PerfDbClient::setTimes(double server_system_time, double server_user_time,
- double client_system_time, double client_user_time) {
+ double client_system_time,
+ double client_user_time) {
server_system_time_ = server_system_time;
server_user_time_ = server_user_time;
client_system_time_ = client_system_time;
diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h
index ce7a88bbff..7a9d86d3a6 100644
--- a/test/cpp/qps/perf_db_client.h
+++ b/test/cpp/qps/perf_db_client.h
@@ -82,9 +82,8 @@ class PerfDbClient {
void setQpsPerCore(double qps_per_core);
// sets the 50th, 90th, 95th, 99th and 99.9th percentile latency
- void setLatencies(double perc_lat_50, double perc_lat_90,
- double perc_lat_95, double perc_lat_99,
- double perc_lat_99_point_9);
+ void setLatencies(double perc_lat_50, double perc_lat_90, double perc_lat_95,
+ double perc_lat_99, double perc_lat_99_point_9);
// sets the server and client, user and system times
void setTimes(double server_system_time, double server_user_time,
diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc
index cecd1be03f..1eed956a1c 100644
--- a/test/cpp/qps/qps_interarrival_test.cc
+++ b/test/cpp/qps/qps_interarrival_test.cc
@@ -42,7 +42,7 @@
using grpc::testing::RandomDist;
using grpc::testing::InterarrivalTimer;
-void RunTest(RandomDist&& r, int threads, std::string title) {
+void RunTest(RandomDist &&r, int threads, std::string title) {
InterarrivalTimer timer;
timer.init(r, threads);
gpr_histogram *h(gpr_histogram_create(0.01, 60e9));
diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc
index 96a9b4504c..9a7313f6e8 100644
--- a/test/cpp/qps/qps_openloop_test.cc
+++ b/test/cpp/qps/qps_openloop_test.cc
@@ -59,8 +59,8 @@ static void RunQPS() {
client_config.set_async_client_threads(8);
client_config.set_rpc_type(UNARY);
client_config.set_load_type(POISSON);
- client_config.mutable_load_params()->
- mutable_poisson()->set_offered_load(1000.0);
+ client_config.mutable_load_params()->mutable_poisson()->set_offered_load(
+ 1000.0);
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
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,