diff options
Diffstat (limited to 'test/core/client_channel/lb_policies_test.c')
-rw-r--r-- | test/core/client_channel/lb_policies_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 857ba6bd52..7c639cbeb9 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -643,6 +643,7 @@ static void test_get_channel_info() { "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); // Ensures that resolver returns. grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + // Use grpc_channel_get_info() to get LB policy name. char *lb_policy_name = NULL; grpc_channel_info channel_info; channel_info.lb_policy_name = &lb_policy_name; @@ -650,6 +651,10 @@ static void test_get_channel_info() { GPR_ASSERT(lb_policy_name != NULL); GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); gpr_free(lb_policy_name); + // Try again without requesting anything. This is a no-op. + channel_info.lb_policy_name = NULL; + grpc_channel_get_info(channel, &channel_info); + // Clean up. grpc_channel_destroy(channel); } |