diff options
author | 2017-01-04 09:52:38 -0800 | |
---|---|---|
committer | 2017-01-04 09:52:38 -0800 | |
commit | d191d31e4963b23255840ffe648290ab92d5e8bc (patch) | |
tree | 7d41f228315210f851fbdc83e8c4fe0e90bae298 /test/core/client_channel/resolvers/dns_resolver_connectivity_test.c | |
parent | ef35bc33bdf7cc40ad3ef1fd254b3959ddd9fe6d (diff) | |
parent | 19cd772a6c4ac947b7a22f2de37daf61c6f9d80c (diff) |
Merge branch 'master' into tweak_slice_buffer
Diffstat (limited to 'test/core/client_channel/resolvers/dns_resolver_connectivity_test.c')
-rw-r--r-- | test/core/client_channel/resolvers/dns_resolver_connectivity_test.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c index ffa167a0e7..b421720492 100644 --- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c @@ -63,7 +63,8 @@ static grpc_error *my_resolve_address(const char *name, const char *addr, } } -static grpc_resolver *create_resolver(const char *name) { +static grpc_resolver *create_resolver(grpc_exec_ctx *exec_ctx, + const char *name) { grpc_resolver_factory *factory = grpc_resolver_factory_lookup("dns"); grpc_uri *uri = grpc_uri_parse(name, 0); GPR_ASSERT(uri); @@ -71,7 +72,7 @@ static grpc_resolver *create_resolver(const char *name) { memset(&args, 0, sizeof(args)); args.uri = uri; grpc_resolver *resolver = - grpc_resolver_factory_create_resolver(factory, &args); + grpc_resolver_factory_create_resolver(exec_ctx, factory, &args); grpc_resolver_factory_unref(factory); grpc_uri_destroy(uri); return resolver; @@ -101,12 +102,10 @@ int main(int argc, char **argv) { grpc_init(); gpr_mu_init(&g_mu); grpc_blocking_resolve_address = my_resolve_address; - - grpc_resolver *resolver = create_resolver("dns:test"); - grpc_channel_args *result = (grpc_channel_args *)1; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resolver *resolver = create_resolver(&exec_ctx, "dns:test"); gpr_event ev1; gpr_event_init(&ev1); grpc_resolver_next(&exec_ctx, resolver, &result, |