aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-06-08 14:57:11 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2017-06-08 15:29:29 -0700
commit274bbbe6a0bd56651d48d974e1ccd80cf68689df (patch)
tree240da3d682eea3d09fdb79c21157462c7fe37a74 /test/core/client_channel
parent1621f5e05152a9d0b7c7ca6341d45fd44cf56701 (diff)
Add rich closure debug mode
Diffstat (limited to 'test/core/client_channel')
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.c10
-rw-r--r--test/core/client_channel/resolvers/fake_resolver_test.c4
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.c2
3 files changed, 8 insertions, 8 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 43dc7e9084..6e3d69c265 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
@@ -54,7 +54,7 @@ static void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
(*addrs)->addrs = gpr_malloc(sizeof(*(*addrs)->addrs));
(*addrs)->addrs[0].len = 123;
}
- grpc_closure_sched(exec_ctx, on_done, error);
+ GRPC_CLOSURE_SCHED(exec_ctx, on_done, error);
}
static grpc_ares_request *my_dns_lookup_ares(
@@ -73,7 +73,7 @@ static grpc_ares_request *my_dns_lookup_ares(
*lb_addrs = grpc_lb_addresses_create(1, NULL);
grpc_lb_addresses_set_address(*lb_addrs, 0, NULL, 0, false, NULL, NULL);
}
- grpc_closure_sched(exec_ctx, on_done, error);
+ GRPC_CLOSURE_SCHED(exec_ctx, on_done, error);
return NULL;
}
@@ -133,7 +133,7 @@ static void call_resolver_next_after_locking(grpc_exec_ctx *exec_ctx,
a->resolver = resolver;
a->result = result;
a->on_complete = on_complete;
- grpc_closure_sched(exec_ctx, grpc_closure_create(
+ GRPC_CLOSURE_SCHED(exec_ctx, GRPC_CLOSURE_CREATE(
call_resolver_next_now_lock_taken, a,
grpc_combiner_scheduler(resolver->combiner)),
GRPC_ERROR_NONE);
@@ -155,7 +155,7 @@ int main(int argc, char **argv) {
gpr_event_init(&ev1);
call_resolver_next_after_locking(
&exec_ctx, resolver, &result,
- grpc_closure_create(on_done, &ev1, grpc_schedule_on_exec_ctx));
+ GRPC_CLOSURE_CREATE(on_done, &ev1, grpc_schedule_on_exec_ctx));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(5, &ev1));
GPR_ASSERT(result == NULL);
@@ -164,7 +164,7 @@ int main(int argc, char **argv) {
gpr_event_init(&ev2);
call_resolver_next_after_locking(
&exec_ctx, resolver, &result,
- grpc_closure_create(on_done, &ev2, grpc_schedule_on_exec_ctx));
+ GRPC_CLOSURE_CREATE(on_done, &ev2, grpc_schedule_on_exec_ctx));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(30, &ev2));
GPR_ASSERT(result != NULL);
diff --git a/test/core/client_channel/resolvers/fake_resolver_test.c b/test/core/client_channel/resolvers/fake_resolver_test.c
index 74aabffeca..9b0854d6d8 100644
--- a/test/core/client_channel/resolvers/fake_resolver_test.c
+++ b/test/core/client_channel/resolvers/fake_resolver_test.c
@@ -101,7 +101,7 @@ static void test_fake_resolver() {
memset(&on_res_arg, 0, sizeof(on_res_arg));
on_res_arg.expected_resolver_result = results;
gpr_event_init(&on_res_arg.ev);
- grpc_closure *on_resolution = grpc_closure_create(
+ grpc_closure *on_resolution = GRPC_CLOSURE_CREATE(
on_resolution_cb, &on_res_arg, grpc_combiner_scheduler(combiner));
// Set resolver results and trigger first resolution. on_resolution_cb
@@ -138,7 +138,7 @@ static void test_fake_resolver() {
memset(&on_res_arg_update, 0, sizeof(on_res_arg_update));
on_res_arg_update.expected_resolver_result = results_update;
gpr_event_init(&on_res_arg_update.ev);
- on_resolution = grpc_closure_create(on_resolution_cb, &on_res_arg_update,
+ on_resolution = GRPC_CLOSURE_CREATE(on_resolution_cb, &on_res_arg_update,
grpc_combiner_scheduler(combiner));
// Set updated resolver results and trigger a second resolution.
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
index 11d09acaa1..8b88619164 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.c
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
@@ -57,7 +57,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
on_resolution_arg on_res_arg;
memset(&on_res_arg, 0, sizeof(on_res_arg));
on_res_arg.expected_server_name = uri->path;
- grpc_closure *on_resolution = grpc_closure_create(
+ grpc_closure *on_resolution = GRPC_CLOSURE_CREATE(
on_resolution_cb, &on_res_arg, grpc_schedule_on_exec_ctx);
grpc_resolver_next_locked(&exec_ctx, resolver, &on_res_arg.resolver_result,