From 463cde7cf98c085abbb18e6e73fdc7b966938177 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 17 Jul 2015 15:21:39 -0700 Subject: [PATCH] update according to spec change --- test/cpp/interop/interop_client.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 30056e26ab2..4dcd8ad0618 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 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) {