Fix broken test.

pull/7839/head
Mark D. Roth 8 years ago
parent a275aea530
commit 1edf65219e
  1. 12
      test/core/client_config/resolvers/dns_resolver_connectivity_test.c

@ -127,26 +127,26 @@ int main(int argc, char **argv) {
grpc_resolver *resolver = create_resolver("dns:test");
grpc_client_config *config = (grpc_client_config *)1;
grpc_resolver_result *result = (grpc_resolver_result *)1;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_event ev1;
gpr_event_init(&ev1);
grpc_resolver_next(&exec_ctx, resolver, &config,
grpc_resolver_next(&exec_ctx, resolver, &result,
grpc_closure_create(on_done, &ev1));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(5, &ev1));
GPR_ASSERT(config == NULL);
GPR_ASSERT(result == NULL);
gpr_event ev2;
gpr_event_init(&ev2);
grpc_resolver_next(&exec_ctx, resolver, &config,
grpc_resolver_next(&exec_ctx, resolver, &result,
grpc_closure_create(on_done, &ev2));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(30, &ev2));
GPR_ASSERT(config != NULL);
GPR_ASSERT(result != NULL);
grpc_client_config_unref(&exec_ctx, config);
grpc_resolver_result_unref(&exec_ctx, result);
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test");
grpc_exec_ctx_finish(&exec_ctx);

Loading…
Cancel
Save