|
|
@ -70,16 +70,15 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { |
|
|
|
|
|
|
|
|
|
|
|
on_resolution_arg on_res_arg; |
|
|
|
on_resolution_arg on_res_arg; |
|
|
|
memset(&on_res_arg, 0, sizeof(on_res_arg)); |
|
|
|
memset(&on_res_arg, 0, sizeof(on_res_arg)); |
|
|
|
on_res_arg.expected_server_name = gpr_strdup(uri->path); |
|
|
|
on_res_arg.expected_server_name = uri->path; |
|
|
|
grpc_closure *on_resolution = |
|
|
|
grpc_closure *on_resolution = |
|
|
|
grpc_closure_create(on_resolution_cb, &on_res_arg); |
|
|
|
grpc_closure_create(on_resolution_cb, &on_res_arg); |
|
|
|
|
|
|
|
|
|
|
|
grpc_resolver_next(&exec_ctx, resolver, &on_res_arg.resolver_result, |
|
|
|
grpc_resolver_next(&exec_ctx, resolver, &on_res_arg.resolver_result, |
|
|
|
on_resolution); |
|
|
|
on_resolution); |
|
|
|
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); |
|
|
|
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); |
|
|
|
grpc_uri_destroy(uri); |
|
|
|
|
|
|
|
grpc_exec_ctx_finish(&exec_ctx); |
|
|
|
grpc_exec_ctx_finish(&exec_ctx); |
|
|
|
gpr_free(on_res_arg.expected_server_name); |
|
|
|
grpc_uri_destroy(uri); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void test_fails(grpc_resolver_factory *factory, const char *string) { |
|
|
|
static void test_fails(grpc_resolver_factory *factory, const char *string) { |
|
|
|