|
|
@ -37,6 +37,7 @@ |
|
|
|
#include <grpc/support/alloc.h> |
|
|
|
#include <grpc/support/alloc.h> |
|
|
|
|
|
|
|
|
|
|
|
#include "src/core/ext/client_channel/resolver_registry.h" |
|
|
|
#include "src/core/ext/client_channel/resolver_registry.h" |
|
|
|
|
|
|
|
#include "src/core/lib/channel/channel_args.h" |
|
|
|
#include "src/core/lib/iomgr/resolve_address.h" |
|
|
|
#include "src/core/lib/iomgr/resolve_address.h" |
|
|
|
#include "src/core/lib/iomgr/timer.h" |
|
|
|
#include "src/core/lib/iomgr/timer.h" |
|
|
|
#include "test/core/util/test_config.h" |
|
|
|
#include "test/core/util/test_config.h" |
|
|
@ -103,7 +104,7 @@ int main(int argc, char **argv) { |
|
|
|
|
|
|
|
|
|
|
|
grpc_resolver *resolver = create_resolver("dns:test"); |
|
|
|
grpc_resolver *resolver = create_resolver("dns:test"); |
|
|
|
|
|
|
|
|
|
|
|
grpc_resolver_result *result = (grpc_resolver_result *)1; |
|
|
|
grpc_channel_args *result = (grpc_channel_args *)1; |
|
|
|
|
|
|
|
|
|
|
|
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
|
|
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
|
|
gpr_event ev1; |
|
|
|
gpr_event ev1; |
|
|
@ -122,7 +123,7 @@ int main(int argc, char **argv) { |
|
|
|
GPR_ASSERT(wait_loop(30, &ev2)); |
|
|
|
GPR_ASSERT(wait_loop(30, &ev2)); |
|
|
|
GPR_ASSERT(result != NULL); |
|
|
|
GPR_ASSERT(result != NULL); |
|
|
|
|
|
|
|
|
|
|
|
grpc_resolver_result_unref(&exec_ctx, result); |
|
|
|
grpc_channel_args_destroy(result); |
|
|
|
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test"); |
|
|
|
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test"); |
|
|
|
grpc_exec_ctx_finish(&exec_ctx); |
|
|
|
grpc_exec_ctx_finish(&exec_ctx); |
|
|
|
|
|
|
|
|
|
|
|