aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel/resolvers/sockaddr_resolver_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/client_channel/resolvers/sockaddr_resolver_test.c')
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
index 8b88619164..e69c68141b 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.c
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
@@ -35,14 +35,14 @@ typedef struct on_resolution_arg {
grpc_channel_args *resolver_result;
} on_resolution_arg;
-void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
+void on_resolution_cb(void *arg, grpc_error *error) {
on_resolution_arg *res = arg;
- grpc_channel_args_destroy(exec_ctx, res->resolver_result);
+ grpc_channel_args_destroy(res->resolver_result);
}
static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, string, 0);
+ exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_uri *uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver *resolver;
gpr_log(GPR_DEBUG, "test: '%s' should be valid for '%s'", string,
@@ -51,7 +51,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
memset(&args, 0, sizeof(args));
args.uri = uri;
args.combiner = g_combiner;
- resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(factory, &args);
GPR_ASSERT(resolver != NULL);
on_resolution_arg on_res_arg;
@@ -60,16 +60,16 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
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,
+ grpc_resolver_next_locked(resolver, &on_res_arg.resolver_result,
on_resolution);
- GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds");
- grpc_exec_ctx_finish(&exec_ctx);
+ GRPC_RESOLVER_UNREF(resolver, "test_succeeds");
+ grpc_exec_ctx_finish();
grpc_uri_destroy(uri);
}
static void test_fails(grpc_resolver_factory *factory, const char *string) {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_uri *uri = grpc_uri_parse(&exec_ctx, string, 0);
+ exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_uri *uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver *resolver;
gpr_log(GPR_DEBUG, "test: '%s' should be invalid for '%s'", string,
@@ -78,10 +78,10 @@ static void test_fails(grpc_resolver_factory *factory, const char *string) {
memset(&args, 0, sizeof(args));
args.uri = uri;
args.combiner = g_combiner;
- resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(factory, &args);
GPR_ASSERT(resolver == NULL);
grpc_uri_destroy(uri);
- grpc_exec_ctx_finish(&exec_ctx);
+ grpc_exec_ctx_finish();
}
int main(int argc, char **argv) {
@@ -112,9 +112,9 @@ int main(int argc, char **argv) {
grpc_resolver_factory_unref(ipv6);
{
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- GRPC_COMBINER_UNREF(&exec_ctx, g_combiner, "test");
- grpc_exec_ctx_finish(&exec_ctx);
+ exec_ctx = GRPC_EXEC_CTX_INIT;
+ GRPC_COMBINER_UNREF(g_combiner, "test");
+ grpc_exec_ctx_finish();
}
grpc_shutdown();