aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-21 22:58:58 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-21 22:58:58 -0700
commite06a81f877080becddcb07923ee680188d4988f3 (patch)
treed8d2794ce588dc4b6ab4ab5a19fb7e777aa365f0 /test/core/iomgr
parent88b9e4803ceb6d434c3b59ed0fe8e87f41681dd2 (diff)
Fixup API changes
Diffstat (limited to 'test/core/iomgr')
-rw-r--r--test/core/iomgr/resolve_address_test.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c
index a66edc9df2..c3ede1801d 100644
--- a/test/core/iomgr/resolve_address_test.c
+++ b/test/core/iomgr/resolve_address_test.c
@@ -59,28 +59,36 @@ static void must_fail(grpc_exec_ctx *exec_ctx, void *evp,
static void test_localhost(void) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address("localhost:1", NULL, must_succeed, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, "localhost:1", NULL, must_succeed, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
static void test_default_port(void) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address("localhost", "1", must_succeed, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, "localhost", "1", must_succeed, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
static void test_missing_default_port(void) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address("localhost", NULL, must_fail, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, "localhost", NULL, must_fail, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
static void test_ipv6_with_port(void) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address("[2001:db8::1]:1", NULL, must_succeed, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, "[2001:db8::1]:1", NULL, must_succeed, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
@@ -92,7 +100,9 @@ static void test_ipv6_without_port(void) {
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address(kCases[i], "80", must_succeed, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, kCases[i], "80", must_succeed, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
}
@@ -105,7 +115,9 @@ static void test_invalid_ip_addresses(void) {
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address(kCases[i], NULL, must_fail, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, kCases[i], NULL, must_fail, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
}
@@ -118,7 +130,9 @@ static void test_unparseable_hostports(void) {
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
gpr_event ev;
gpr_event_init(&ev);
- grpc_resolve_address(kCases[i], "1", must_fail, &ev);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_resolve_address(&exec_ctx, kCases[i], "1", must_fail, &ev);
+ grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
}