diff options
Diffstat (limited to 'test/cpp/interop/client_helper.cc')
-rw-r--r-- | test/cpp/interop/client_helper.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index b4d5b88de5..a1dea383e6 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -85,8 +85,9 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( std::unique_ptr<Credentials> creds; GPR_ASSERT(FLAGS_enable_ssl); grpc::string json_key = GetServiceAccountJsonKey(); + std::chrono::seconds token_lifetime = std::chrono::hours(1); creds = ServiceAccountCredentials(json_key, FLAGS_oauth_scope, - std::chrono::hours(1)); + token_lifetime.count()); return CreateTestChannel(host_port, FLAGS_server_host_override, FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); } else if (test_case == "compute_engine_creds") { @@ -99,7 +100,8 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( std::unique_ptr<Credentials> creds; GPR_ASSERT(FLAGS_enable_ssl); grpc::string json_key = GetServiceAccountJsonKey(); - creds = JWTCredentials(json_key, std::chrono::hours(1)); + std::chrono::seconds token_lifetime = std::chrono::hours(1); + creds = JWTCredentials(json_key, token_lifetime.count()); return CreateTestChannel(host_port, FLAGS_server_host_override, FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); } else { |