aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fixtures/h2_oauth2.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-07-21 15:42:00 -0700
committerGravatar Mark D. Roth <roth@google.com>2017-07-21 15:42:00 -0700
commite0778b2c1817f3b7aff5af4b1b15493d4a8a207d (patch)
treeac0249dc00b2aa50a2a7a0eeb31469d02a333735 /test/core/end2end/fixtures/h2_oauth2.c
parent8321cadeb031cfa7f142479b40fc13e52216790c (diff)
Add cancellation to asynchronous security APIs.
Diffstat (limited to 'test/core/end2end/fixtures/h2_oauth2.c')
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c
index 9cbaaa0811..ee1d0b1416 100644
--- a/test/core/end2end/fixtures/h2_oauth2.c
+++ b/test/core/end2end/fixtures/h2_oauth2.c
@@ -137,10 +137,11 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(test_root_cert, NULL, NULL);
- grpc_call_credentials *oauth2_creds =
- grpc_md_only_test_credentials_create("authorization", oauth2_md, 1);
+ grpc_call_credentials *oauth2_creds = grpc_md_only_test_credentials_create(
+ &exec_ctx, "authorization", oauth2_md, true /* is_async */);
grpc_channel_credentials *ssl_oauth2_creds =
grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL);
grpc_arg ssl_name_override = {GRPC_ARG_STRING,
@@ -149,13 +150,10 @@ static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
grpc_channel_args *new_client_args =
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_oauth2_creds);
- {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_channel_args_destroy(&exec_ctx, new_client_args);
- grpc_exec_ctx_finish(&exec_ctx);
- }
+ grpc_channel_args_destroy(&exec_ctx, new_client_args);
grpc_channel_credentials_release(ssl_creds);
grpc_call_credentials_release(oauth2_creds);
+ grpc_exec_ctx_finish(&exec_ctx);
}
static int fail_server_auth_check(grpc_channel_args *server_args) {