aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/security
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-13 15:37:58 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-14 01:36:28 -0800
commit75122c23578e24417dcf64081c737571a9fc2dbc (patch)
treef4b8491964ec0508a5826490628c9f87b82c3326 /test/core/security
parent36cd68f0d543b9024c84eff82319890a791de7f6 (diff)
Address some PR comments
Diffstat (limited to 'test/core/security')
-rw-r--r--test/core/security/credentials_test.cc46
-rw-r--r--test/core/security/json_token_test.cc4
-rw-r--r--test/core/security/jwt_verifier_test.cc20
-rw-r--r--test/core/security/oauth2_utils.cc4
-rw-r--r--test/core/security/print_google_default_creds_token.cc4
-rw-r--r--test/core/security/secure_endpoint_test.cc8
-rw-r--r--test/core/security/ssl_server_fuzzer.cc8
-rw-r--r--test/core/security/verify_jwt.cc4
8 files changed, 31 insertions, 67 deletions
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc
index c03ae5c584..029171c931 100644
--- a/test/core/security/credentials_test.cc
+++ b/test/core/security/credentials_test.cc
@@ -154,7 +154,6 @@ static void test_empty_md_array(void) {
GPR_ASSERT(md_array.md == NULL);
GPR_ASSERT(md_array.size == 0);
grpc_credentials_mdelem_array_destroy(&md_array);
- grpc_exec_ctx_finish();
}
static void test_add_to_empty_md_array(void) {
@@ -170,7 +169,6 @@ static void test_add_to_empty_md_array(void) {
GPR_ASSERT(grpc_mdelem_eq(md, md_array.md[0]));
GRPC_MDELEM_UNREF(md);
grpc_credentials_mdelem_array_destroy(&md_array);
- grpc_exec_ctx_finish();
}
static void test_add_abunch_to_md_array(void) {
@@ -190,7 +188,6 @@ static void test_add_abunch_to_md_array(void) {
}
GRPC_MDELEM_UNREF(md);
grpc_credentials_mdelem_array_destroy(&md_array);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
@@ -208,7 +205,6 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
0);
GRPC_MDELEM_UNREF(token_md);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
@@ -221,7 +217,6 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
@@ -233,7 +228,6 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
@@ -249,7 +243,6 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
@@ -264,7 +257,6 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) {
@@ -280,7 +272,6 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) {
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime(
@@ -296,7 +287,6 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime(
&response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_ERROR);
grpc_http_response_destroy(&response);
- grpc_exec_ctx_finish();
}
typedef struct {
@@ -402,7 +392,6 @@ static void test_google_iam_creds(void) {
NULL};
run_request_metadata_test(creds, auth_md_ctx, state);
grpc_call_credentials_unref(creds);
- grpc_exec_ctx_finish();
}
static void test_access_token_creds(void) {
@@ -417,7 +406,6 @@ static void test_access_token_creds(void) {
GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0);
run_request_metadata_test(creds, auth_md_ctx, state);
grpc_call_credentials_unref(creds);
- grpc_exec_ctx_finish();
}
static grpc_security_status check_channel_oauth2_create_security_connector(
@@ -448,7 +436,6 @@ static void test_channel_oauth2_composite_creds(void) {
channel_oauth2_creds, NULL, NULL, NULL, &new_args) ==
GRPC_SECURITY_OK);
grpc_channel_credentials_release(channel_oauth2_creds);
- grpc_exec_ctx_finish();
}
static void test_oauth2_google_iam_composite_creds(void) {
@@ -484,7 +471,6 @@ static void test_oauth2_google_iam_composite_creds(void) {
GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0);
run_request_metadata_test(composite_creds, auth_md_ctx, state);
grpc_call_credentials_unref(composite_creds);
- grpc_exec_ctx_finish();
}
static grpc_security_status
@@ -533,7 +519,6 @@ static void test_channel_oauth2_google_iam_composite_creds(void) {
GRPC_SECURITY_OK);
grpc_channel_credentials_release(channel_oauth2_iam_creds);
- grpc_exec_ctx_finish();
}
static void validate_compute_engine_http_request(
@@ -598,7 +583,7 @@ static void test_compute_engine_creds_success(void) {
grpc_httpcli_set_override(compute_engine_httpcli_get_success_override,
httpcli_post_should_not_be_called);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -606,11 +591,10 @@ static void test_compute_engine_creds_success(void) {
grpc_httpcli_set_override(httpcli_get_should_not_be_called,
httpcli_post_should_not_be_called);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
- grpc_exec_ctx_finish();
}
static void test_compute_engine_creds_failure(void) {
@@ -628,7 +612,6 @@ static void test_compute_engine_creds_failure(void) {
run_request_metadata_test(creds, auth_md_ctx, state);
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
- grpc_exec_ctx_finish();
}
static void validate_refresh_token_http_request(
@@ -689,7 +672,7 @@ static void test_refresh_token_creds_success(void) {
grpc_httpcli_set_override(httpcli_get_should_not_be_called,
refresh_token_httpcli_post_success);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -697,11 +680,10 @@ static void test_refresh_token_creds_success(void) {
grpc_httpcli_set_override(httpcli_get_should_not_be_called,
httpcli_post_should_not_be_called);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
- grpc_exec_ctx_finish();
}
static void test_refresh_token_creds_failure(void) {
@@ -719,7 +701,6 @@ static void test_refresh_token_creds_failure(void) {
run_request_metadata_test(creds, auth_md_ctx, state);
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
- grpc_exec_ctx_finish();
}
static void validate_jwt_encode_and_sign_params(
@@ -824,7 +805,7 @@ static void test_jwt_creds_success(void) {
make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd));
grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -832,7 +813,7 @@ static void test_jwt_creds_success(void) {
grpc_jwt_encode_and_sign_set_override(
encode_and_sign_jwt_should_not_be_called);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
/* Third request: Different service url so jwt_encode_and_sign should be
called again (no caching). */
@@ -841,13 +822,12 @@ static void test_jwt_creds_success(void) {
auth_md_ctx.service_url = other_test_service_url;
grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success);
run_request_metadata_test(creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
gpr_free(json_key_string);
gpr_free(expected_md_value);
grpc_jwt_encode_and_sign_set_override(NULL);
- grpc_exec_ctx_finish();
}
static void test_jwt_creds_signing_failure(void) {
@@ -867,7 +847,6 @@ static void test_jwt_creds_signing_failure(void) {
gpr_free(json_key_string);
grpc_call_credentials_unref(creds);
grpc_jwt_encode_and_sign_set_override(NULL);
- grpc_exec_ctx_finish();
}
static void set_google_default_creds_env_var_with_file_contents(
@@ -902,7 +881,6 @@ static void test_google_default_creds_auth_key(void) {
0);
grpc_channel_credentials_unref(&creds->base);
gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */
- grpc_exec_ctx_finish();
}
static void test_google_default_creds_refresh_token(void) {
@@ -920,7 +898,6 @@ static void test_google_default_creds_refresh_token(void) {
"32555999999.apps.googleusercontent.com") == 0);
grpc_channel_credentials_unref(&creds->base);
gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */
- grpc_exec_ctx_finish();
}
static int default_creds_gce_detection_httpcli_get_success_override(
@@ -968,7 +945,7 @@ static void test_google_default_creds_gce(void) {
grpc_httpcli_set_override(compute_engine_httpcli_get_success_override,
httpcli_post_should_not_be_called);
run_request_metadata_test(creds->call_creds, auth_md_ctx, state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
/* Check that we get a cached creds if we call
grpc_google_default_credentials_create again.
@@ -984,7 +961,6 @@ static void test_google_default_creds_gce(void) {
grpc_channel_credentials_unref(&creds->base);
grpc_httpcli_set_override(NULL, NULL);
grpc_override_well_known_credentials_path_getter(NULL);
- grpc_exec_ctx_finish();
}
static int default_creds_gce_detection_httpcli_get_failure_override(
@@ -1094,7 +1070,7 @@ static void test_metadata_plugin_success(void) {
run_request_metadata_test(creds, auth_md_ctx, md_state);
GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE);
grpc_call_credentials_unref(creds);
- grpc_exec_ctx_finish();
+
GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE);
}
@@ -1122,7 +1098,7 @@ static void test_metadata_plugin_failure(void) {
run_request_metadata_test(creds, auth_md_ctx, md_state);
GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE);
grpc_call_credentials_unref(creds);
- grpc_exec_ctx_finish();
+
GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE);
}
@@ -1167,8 +1143,6 @@ static void test_channel_creds_duplicate_without_call_creds(void) {
grpc_channel_credentials_unref(channel_creds);
grpc_channel_credentials_unref(composite_creds);
-
- grpc_exec_ctx_finish();
}
typedef struct {
diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc
index 7052925944..9eac2b9254 100644
--- a/test/core/security/json_token_test.cc
+++ b/test/core/security/json_token_test.cc
@@ -224,7 +224,7 @@ static grpc_json* parse_json_part_from_jwt(const char* str, size_t len,
gpr_free(b64);
*scratchpad = decoded;
grpc_slice_unref(slice);
- grpc_exec_ctx_finish();
+
return json;
}
@@ -348,8 +348,6 @@ static void check_jwt_signature(const char* b64_signature, RSA* rsa_key,
grpc_slice_unref_internal(sig);
if (key != NULL) EVP_PKEY_free(key);
if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx);
-
- grpc_exec_ctx_finish();
}
static char* service_account_creds_jwt_encode_and_sign(
diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc
index 16fad9d45e..7485aa10b4 100644
--- a/test/core/security/jwt_verifier_test.cc
+++ b/test/core/security/jwt_verifier_test.cc
@@ -220,7 +220,6 @@ static void test_claims_success(void) {
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") ==
GRPC_JWT_VERIFIER_OK);
grpc_jwt_claims_destroy(claims);
- grpc_exec_ctx_finish();
}
static void test_expired_claims_failure(void) {
@@ -247,7 +246,6 @@ static void test_expired_claims_failure(void) {
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") ==
GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE);
grpc_jwt_claims_destroy(claims);
- grpc_exec_ctx_finish();
}
static void test_invalid_claims_failure(void) {
@@ -256,7 +254,6 @@ static void test_invalid_claims_failure(void) {
(char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s));
ExecCtx _local_exec_ctx;
GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL);
- grpc_exec_ctx_finish();
}
static void test_bad_audience_claims_failure(void) {
@@ -271,7 +268,6 @@ static void test_bad_audience_claims_failure(void) {
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://bar.com") ==
GRPC_JWT_VERIFIER_BAD_AUDIENCE);
grpc_jwt_claims_destroy(claims);
- grpc_exec_ctx_finish();
}
static void test_bad_subject_claims_failure(void) {
@@ -286,7 +282,6 @@ static void test_bad_subject_claims_failure(void) {
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") ==
GRPC_JWT_VERIFIER_BAD_SUBJECT);
grpc_jwt_claims_destroy(claims);
- grpc_exec_ctx_finish();
}
static char* json_key_str(const char* last_part) {
@@ -371,7 +366,7 @@ static void test_jwt_verifier_google_email_issuer_success(void) {
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
on_verification_success, (void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_free(jwt);
grpc_httpcli_set_override(NULL, NULL);
}
@@ -404,7 +399,7 @@ static void test_jwt_verifier_custom_email_issuer_success(void) {
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
on_verification_success, (void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_free(jwt);
grpc_httpcli_set_override(NULL, NULL);
}
@@ -451,7 +446,7 @@ static void test_jwt_verifier_url_issuer_success(void) {
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
on_verification_success, (void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_free(jwt);
grpc_httpcli_set_override(NULL, NULL);
}
@@ -491,7 +486,7 @@ static void test_jwt_verifier_url_issuer_bad_config(void) {
on_verification_key_retrieval_error,
(void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_free(jwt);
grpc_httpcli_set_override(NULL, NULL);
}
@@ -514,7 +509,7 @@ static void test_jwt_verifier_bad_json_key(void) {
on_verification_key_retrieval_error,
(void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_free(jwt);
grpc_httpcli_set_override(NULL, NULL);
}
@@ -528,7 +523,6 @@ static void corrupt_jwt_sig(char* jwt) {
{
ExecCtx _local_exec_ctx;
sig = grpc_base64_decode(last_dot + 1, 1);
- grpc_exec_ctx_finish();
}
GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig));
sig_bytes = GRPC_SLICE_START_PTR(sig);
@@ -568,7 +562,7 @@ static void test_jwt_verifier_bad_signature(void) {
(void*)expected_user_data);
gpr_free(jwt);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
grpc_httpcli_set_override(NULL, NULL);
}
@@ -597,7 +591,7 @@ static void test_jwt_verifier_bad_format(void) {
on_verification_bad_format,
(void*)expected_user_data);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
grpc_httpcli_set_override(NULL, NULL);
}
diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc
index 6104c7e9dd..f4a52aaba0 100644
--- a/test/core/security/oauth2_utils.cc
+++ b/test/core/security/oauth2_utils.cc
@@ -92,7 +92,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials(
on_oauth2_response(&request, error);
GRPC_ERROR_UNREF(error);
}
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
gpr_mu_lock(request.mu);
while (!request.is_done) {
@@ -108,7 +108,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials(
grpc_pollset_shutdown(grpc_polling_entity_pollset(&request.pops),
&do_nothing_closure);
- grpc_exec_ctx_finish();
+
gpr_free(grpc_polling_entity_pollset(&request.pops));
return request.token;
}
diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc
index 6ea51658e1..6153e8a9cb 100644
--- a/test/core/security/print_google_default_creds_token.cc
+++ b/test/core/security/print_google_default_creds_token.cc
@@ -111,13 +111,11 @@ int main(int argc, char** argv) {
GRPC_MILLIS_INF_FUTURE)))
sync.is_done = true;
gpr_mu_unlock(sync.mu);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
gpr_mu_lock(sync.mu);
}
gpr_mu_unlock(sync.mu);
- grpc_exec_ctx_finish();
-
grpc_channel_credentials_release(creds);
gpr_free(grpc_polling_entity_pollset(&sync.pops));
diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc
index a72329d504..a49bf1a0b4 100644
--- a/test/core/security/secure_endpoint_test.cc
+++ b/test/core/security/secure_endpoint_test.cc
@@ -115,7 +115,7 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair(
f.server_ep = grpc_secure_endpoint_create(fake_write_protector,
fake_write_zero_copy_protector,
tcp.server, NULL, 0);
- grpc_exec_ctx_finish();
+
return f;
}
@@ -178,7 +178,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) {
grpc_slice_buffer_init(&incoming);
GRPC_CLOSURE_INIT(&done_closure, inc_call_ctr, &n, grpc_schedule_on_exec_ctx);
grpc_endpoint_read(f.client_ep, &incoming, &done_closure);
- grpc_exec_ctx_finish();
+
GPR_ASSERT(n == 1);
GPR_ASSERT(incoming.count == 1);
GPR_ASSERT(grpc_slice_eq(s, incoming.slices[0]));
@@ -189,7 +189,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) {
f.server_ep, GRPC_ERROR_CREATE_FROM_STATIC_STRING("test_leftover end"));
grpc_endpoint_destroy(f.client_ep);
grpc_endpoint_destroy(f.server_ep);
- grpc_exec_ctx_finish();
+
grpc_slice_unref_internal(s);
grpc_slice_buffer_destroy_internal(&incoming);
@@ -215,7 +215,7 @@ int main(int argc, char** argv) {
GRPC_CLOSURE_INIT(&destroyed, destroy_pollset, g_pollset,
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(g_pollset, &destroyed);
- grpc_exec_ctx_finish();
+
grpc_shutdown();
gpr_free(g_pollset);
diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc
index 3ee7738ea8..84a42546c6 100644
--- a/test/core/security/ssl_server_fuzzer.cc
+++ b/test/core/security/ssl_server_fuzzer.cc
@@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_security_status status =
grpc_server_credentials_create_security_connector(creds, &sc);
GPR_ASSERT(status == GRPC_SECURITY_OK);
- grpc_millis deadline = GPR_MS_PER_SEC + grpc_exec_ctx_now();
+ grpc_millis deadline = GPR_MS_PER_SEC + ExecCtx::Get()->Now();
struct handshake_state state;
state.done_callback_called = false;
@@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_handshake_manager_do_handshake(
handshake_mgr, mock_endpoint, NULL /* channel_args */, deadline,
NULL /* acceptor */, on_handshake_done, &state);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
// If the given string happens to be part of the correct client hello, the
// server will wait for more data. Explicitly fail the server by shutting down
@@ -100,7 +100,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!state.done_callback_called) {
grpc_endpoint_shutdown(
mock_endpoint, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Explicit close"));
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
}
GPR_ASSERT(state.done_callback_called);
@@ -111,7 +111,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_slice_unref(cert_slice);
grpc_slice_unref(key_slice);
grpc_slice_unref(ca_slice);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
grpc_shutdown();
if (leak_check) {
diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc
index fce1e9d8de..f3e8966625 100644
--- a/test/core/security/verify_jwt.cc
+++ b/test/core/security/verify_jwt.cc
@@ -106,7 +106,7 @@ int main(int argc, char** argv) {
grpc_pollset_work(sync.pollset, &worker, GRPC_MILLIS_INF_FUTURE)))
sync.is_done = true;
gpr_mu_unlock(sync.mu);
- grpc_exec_ctx_flush();
+ ExecCtx::Get()->Flush();
gpr_mu_lock(sync.mu);
}
gpr_mu_unlock(sync.mu);
@@ -114,7 +114,7 @@ int main(int argc, char** argv) {
gpr_free(sync.pollset);
grpc_jwt_verifier_destroy(verifier);
- grpc_exec_ctx_finish();
+
gpr_cmdline_destroy(cl);
grpc_shutdown();
return !sync.success;