aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/client_channel')
-rw-r--r--test/core/client_channel/lb_policies_test.c6
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.c6
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_test.c4
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.c6
-rw-r--r--test/core/client_channel/set_initial_connect_string_test.c2
5 files changed, 15 insertions, 9 deletions
diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c
index 6e4058fc21..e3550d7f6b 100644
--- a/test/core/client_channel/lb_policies_test.c
+++ b/test/core/client_channel/lb_policies_test.c
@@ -643,7 +643,11 @@ static void test_get_channel_info() {
arg.value.string = "{\"loadBalancingPolicy\": \"ROUND_ROBIN\"}";
grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
channel = grpc_insecure_channel_create("ipv4:127.0.0.1:1234", args, NULL);
- grpc_channel_args_destroy(args);
+ {
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_channel_args_destroy(&exec_ctx, args);
+ grpc_exec_ctx_finish(&exec_ctx);
+ }
// Ensures that resolver returns.
grpc_channel_check_connectivity_state(channel, true /* try_to_connect */);
// Now request the service config again.
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 ffa167a0e7..5ba8ef85e7 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
@@ -64,6 +64,7 @@ static grpc_error *my_resolve_address(const char *name, const char *addr,
}
static grpc_resolver *create_resolver(const char *name) {
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resolver_factory *factory = grpc_resolver_factory_lookup("dns");
grpc_uri *uri = grpc_uri_parse(name, 0);
GPR_ASSERT(uri);
@@ -71,9 +72,10 @@ static grpc_resolver *create_resolver(const char *name) {
memset(&args, 0, sizeof(args));
args.uri = uri;
grpc_resolver *resolver =
- grpc_resolver_factory_create_resolver(factory, &args);
+ grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
grpc_resolver_factory_unref(factory);
grpc_uri_destroy(uri);
+ grpc_exec_ctx_finish(&exec_ctx);
return resolver;
}
@@ -123,7 +125,7 @@ int main(int argc, char **argv) {
GPR_ASSERT(wait_loop(30, &ev2));
GPR_ASSERT(result != NULL);
- grpc_channel_args_destroy(result);
+ grpc_channel_args_destroy(&exec_ctx, result);
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test");
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/client_channel/resolvers/dns_resolver_test.c b/test/core/client_channel/resolvers/dns_resolver_test.c
index 41a9125431..5603a57b5f 100644
--- a/test/core/client_channel/resolvers/dns_resolver_test.c
+++ b/test/core/client_channel/resolvers/dns_resolver_test.c
@@ -48,7 +48,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
GPR_ASSERT(uri);
memset(&args, 0, sizeof(args));
args.uri = uri;
- resolver = grpc_resolver_factory_create_resolver(factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
GPR_ASSERT(resolver != NULL);
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds");
grpc_uri_destroy(uri);
@@ -65,7 +65,7 @@ static void test_fails(grpc_resolver_factory *factory, const char *string) {
GPR_ASSERT(uri);
memset(&args, 0, sizeof(args));
args.uri = uri;
- resolver = grpc_resolver_factory_create_resolver(factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
GPR_ASSERT(resolver == NULL);
grpc_uri_destroy(uri);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.c b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
index ebf311ab83..bf49fb155d 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.c
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.c
@@ -54,7 +54,7 @@ void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
GPR_ASSERT(channel_arg != NULL);
GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING);
GPR_ASSERT(strcmp(res->expected_server_name, channel_arg->value.string) == 0);
- grpc_channel_args_destroy(res->resolver_result);
+ grpc_channel_args_destroy(exec_ctx, res->resolver_result);
}
static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
@@ -67,7 +67,7 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
GPR_ASSERT(uri);
memset(&args, 0, sizeof(args));
args.uri = uri;
- resolver = grpc_resolver_factory_create_resolver(factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
GPR_ASSERT(resolver != NULL);
on_resolution_arg on_res_arg;
@@ -93,7 +93,7 @@ static void test_fails(grpc_resolver_factory *factory, const char *string) {
GPR_ASSERT(uri);
memset(&args, 0, sizeof(args));
args.uri = uri;
- resolver = grpc_resolver_factory_create_resolver(factory, &args);
+ resolver = grpc_resolver_factory_create_resolver(&exec_ctx, factory, &args);
GPR_ASSERT(resolver == NULL);
grpc_uri_destroy(uri);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c
index 11e57439d5..b9223483b3 100644
--- a/test/core/client_channel/set_initial_connect_string_test.c
+++ b/test/core/client_channel/set_initial_connect_string_test.c
@@ -158,7 +158,7 @@ static void cleanup_rpc(void) {
grpc_event ev;
grpc_slice_buffer_destroy(&state.incoming_buffer);
grpc_slice_buffer_destroy(&state.temp_incoming_buffer);
- grpc_channel_credentials_unref(state.creds);
+ grpc_channel_credentials_release(state.creds);
grpc_call_destroy(state.call);
grpc_completion_queue_shutdown(state.cq);
do {