aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-10-24 12:53:01 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-10-24 12:53:01 -0700
commit25db523baa162b6b5d0fa2a652aca2d37dfa6dba (patch)
treedd243587cf0d35c8f50cd7c04c9c1810cfa1bd4f /test/core
parent557c990c36dd281812016ad81fa79309078e807d (diff)
Fix sockaddr_resolver_test.
Diffstat (limited to 'test/core')
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.c14
1 files changed, 8 insertions, 6 deletions
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 <grpc/support/string_util.h>
#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) {