aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/interop_client.cc
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-07-17 15:21:39 -0700
committerGravatar yang-g <yangg@google.com>2015-07-17 15:21:39 -0700
commit463cde7cf98c085abbb18e6e73fdc7b966938177 (patch)
treec9be3ff0bf3fb62b9952c5ca39132b7656224e6a /test/cpp/interop/interop_client.cc
parent76fcaeeeb52abdf72f8ee2ef9ef60f26b6514915 (diff)
update according to spec change
Diffstat (limited to 'test/cpp/interop/interop_client.cc')
-rw-r--r--test/cpp/interop/interop_client.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 30056e26ab..4dcd8ad061 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -146,18 +146,24 @@ void InteropClient::DoServiceAccountCreds(const grpc::string& username,
void InteropClient::DoOauth2AuthToken(const grpc::string& username,
const grpc::string& oauth_scope) {
gpr_log(GPR_INFO,
- "Sending a large unary rpc with raw oauth2 access token ...");
+ "Sending a unary rpc with raw oauth2 access token credentials ...");
SimpleRequest request;
SimpleResponse response;
request.set_fill_username(true);
request.set_fill_oauth_scope(true);
- PerformLargeUnary(&request, &response);
+ std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
+
+ ClientContext context;
+
+ Status s = stub->UnaryCall(&context, request, &response);
+
+ AssertOkOrPrintErrorStatus(s);
GPR_ASSERT(!response.username().empty());
GPR_ASSERT(!response.oauth_scope().empty());
GPR_ASSERT(username.find(response.username()) != grpc::string::npos);
const char* oauth_scope_str = response.oauth_scope().c_str();
GPR_ASSERT(oauth_scope.find(oauth_scope_str) != grpc::string::npos);
- gpr_log(GPR_INFO, "Large unary with oauth2 access token done.");
+ gpr_log(GPR_INFO, "Unary with oauth2 access token credentials done.");
}
void InteropClient::DoJwtTokenCreds(const grpc::string& username) {