diff options
author | Craig Tiller <ctiller@google.com> | 2015-06-17 09:15:48 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-06-17 09:15:48 -0700 |
commit | bf8ac3f4060a77ecb2c5d75acffb9d1fd070531c (patch) | |
tree | 3ddd49e1e4169bcee662f27cc4d76f7c138ac823 /test/cpp/qps | |
parent | 4c32de585a0f95139d0c2487bc4f4dc954ed2be7 (diff) | |
parent | 44a1dd36f5370cf62385ac6701bd0bd3bd160d46 (diff) |
Merge branch 'you-complete-me' into we-dont-need-no-backup
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/client_sync.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/driver.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_worker.cc | 24 |
3 files changed, 16 insertions, 16 deletions
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index d1682caf06..718698bfe1 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -103,7 +103,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { grpc::Status s = stub->UnaryCall(&context, request_, &responses_[thread_idx]); histogram->Add((Timer::Now() - start) * 1e9); - return s.IsOk(); + return s.ok(); } }; @@ -124,7 +124,7 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { for (auto stream = stream_.begin(); stream != stream_.end(); stream++) { if (*stream) { (*stream)->WritesDone(); - EXPECT_TRUE((*stream)->Finish().IsOk()); + EXPECT_TRUE((*stream)->Finish().ok()); } } } diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index bf12730f97..c8cc11e6ab 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -241,11 +241,11 @@ std::unique_ptr<ScenarioResult> RunScenario( for (auto client = clients.begin(); client != clients.end(); client++) { GPR_ASSERT(client->stream->WritesDone()); - GPR_ASSERT(client->stream->Finish().IsOk()); + GPR_ASSERT(client->stream->Finish().ok()); } for (auto server = servers.begin(); server != servers.end(); server++) { GPR_ASSERT(server->stream->WritesDone()); - GPR_ASSERT(server->stream->Finish().IsOk()); + GPR_ASSERT(server->stream->Finish().ok()); } return result; } diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 40cc4cb89b..423275ee85 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -100,7 +100,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { - return Status(RESOURCE_EXHAUSTED); + return Status(StatusCode::RESOURCE_EXHAUSTED, ""); } grpc_profiler_start("qps_client.prof"); @@ -114,7 +114,7 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { - return Status(RESOURCE_EXHAUSTED); + return Status(StatusCode::RESOURCE_EXHAUSTED, ""); } grpc_profiler_start("qps_server.prof"); @@ -159,22 +159,22 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { ServerReaderWriter<ClientStatus, ClientArgs>* stream) { ClientArgs args; if (!stream->Read(&args)) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } if (!args.has_setup()) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } auto client = CreateClient(args.setup()); if (!client) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } ClientStatus status; if (!stream->Write(status)) { - return Status(UNKNOWN); + return Status(StatusCode::UNKNOWN, ""); } while (stream->Read(&args)) { if (!args.has_mark()) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } *status.mutable_stats() = client->Mark(); stream->Write(status); @@ -187,23 +187,23 @@ class WorkerImpl GRPC_FINAL : public Worker::Service { ServerReaderWriter<ServerStatus, ServerArgs>* stream) { ServerArgs args; if (!stream->Read(&args)) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } if (!args.has_setup()) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } auto server = CreateServer(args.setup(), server_port_); if (!server) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } ServerStatus status; status.set_port(server_port_); if (!stream->Write(status)) { - return Status(UNKNOWN); + return Status(StatusCode::UNKNOWN, ""); } while (stream->Read(&args)) { if (!args.has_mark()) { - return Status(INVALID_ARGUMENT); + return Status(StatusCode::INVALID_ARGUMENT, ""); } *status.mutable_stats() = server->Mark(); stream->Write(status); |