From 25db523baa162b6b5d0fa2a652aca2d37dfa6dba Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 24 Oct 2016 12:53:01 -0700 Subject: Fix sockaddr_resolver_test. --- .../core/client_channel/resolvers/sockaddr_resolver_test.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/core') diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c index c39052cd9d..20c42b7387 100644 --- a/test/core/client_channel/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c @@ -38,21 +38,23 @@ #include #include "src/core/ext/client_channel/resolver_registry.h" -#include "src/core/ext/client_channel/resolver_result.h" +#include "src/core/lib/channel/channel_args.h" #include "test/core/util/test_config.h" typedef struct on_resolution_arg { char *expected_server_name; - grpc_resolver_result *resolver_result; + grpc_channel_args *resolver_result; } on_resolution_arg; void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { on_resolution_arg *res = arg; - const char *server_name = - grpc_resolver_result_get_server_name(res->resolver_result); - GPR_ASSERT(strcmp(res->expected_server_name, server_name) == 0); - grpc_resolver_result_unref(exec_ctx, res->resolver_result); + const grpc_arg* channel_arg = + grpc_channel_args_find(res->resolver_result, GRPC_ARG_SERVER_NAME); + GPR_ASSERT(channel_arg != NULL); + GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); + GPR_ASSERT(strcmp(res->expected_server_name, channel_arg->value.string) == 0); + grpc_channel_args_destroy(res->resolver_result); } static void test_succeeds(grpc_resolver_factory *factory, const char *string) { -- cgit v1.2.3