Skip to content
Snippets Groups Projects
Commit b05e1a8f authored by Yuchen Zeng's avatar Yuchen Zeng Committed by GitHub
Browse files

Merge pull request #10474 from y-zeng/update_actions

Add UpdateActions to the interop client helper
parents f03a078e e4e76326
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ DEFINE_bool(do_not_abort_on_transient_failures, false, ...@@ -99,6 +99,7 @@ DEFINE_bool(do_not_abort_on_transient_failures, false,
using grpc::testing::CreateChannelForTestCase; using grpc::testing::CreateChannelForTestCase;
using grpc::testing::GetServiceAccountJsonKey; using grpc::testing::GetServiceAccountJsonKey;
using grpc::testing::UpdateActions;
int main(int argc, char** argv) { int main(int argc, char** argv) {
grpc::testing::InitTest(&argc, &argv, true); grpc::testing::InitTest(&argc, &argv, true);
...@@ -165,6 +166,8 @@ int main(int argc, char** argv) { ...@@ -165,6 +166,8 @@ int main(int argc, char** argv) {
// actions["cacheable_unary"] = // actions["cacheable_unary"] =
// std::bind(&grpc::testing::InteropClient::DoCacheableUnary, &client); // std::bind(&grpc::testing::InteropClient::DoCacheableUnary, &client);
UpdateActions(&actions);
if (FLAGS_test_case == "all") { if (FLAGS_test_case == "all") {
for (const auto& action : actions) { for (const auto& action : actions) {
action.second(); action.second();
......
...@@ -89,6 +89,9 @@ grpc::string GetOauth2AccessToken() { ...@@ -89,6 +89,9 @@ grpc::string GetOauth2AccessToken() {
return access_token; return access_token;
} }
void UpdateActions(
std::unordered_map<grpc::string, std::function<bool()>>* actions) {}
std::shared_ptr<Channel> CreateChannelForTestCase( std::shared_ptr<Channel> CreateChannelForTestCase(
const grpc::string& test_case) { const grpc::string& test_case) {
GPR_ASSERT(FLAGS_server_port); GPR_ASSERT(FLAGS_server_port);
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H #define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
#include <memory> #include <memory>
#include <unordered_map>
#include <grpc++/channel.h> #include <grpc++/channel.h>
...@@ -47,6 +48,9 @@ grpc::string GetServiceAccountJsonKey(); ...@@ -47,6 +48,9 @@ grpc::string GetServiceAccountJsonKey();
grpc::string GetOauth2AccessToken(); grpc::string GetOauth2AccessToken();
void UpdateActions(
std::unordered_map<grpc::string, std::function<bool()>>* actions);
std::shared_ptr<Channel> CreateChannelForTestCase( std::shared_ptr<Channel> CreateChannelForTestCase(
const grpc::string& test_case); const grpc::string& test_case);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment