aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-14 18:11:22 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-14 18:11:22 -0800
commit6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch)
tree5d9b7bbdcf125bfc103b67778349ea075b049bb4 /test/core
parent75122c23578e24417dcf64081c737571a9fc2dbc (diff)
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'test/core')
-rw-r--r--test/core/backoff/backoff_test.cc60
-rw-r--r--test/core/bad_client/bad_client.cc4
-rw-r--r--test/core/channel/channel_args_test.cc8
-rw-r--r--test/core/channel/channel_stack_test.cc4
-rw-r--r--test/core/channel/minimal_stack_is_minimal_test.cc4
-rw-r--r--test/core/client_channel/lb_policies_test.cc4
-rw-r--r--test/core/client_channel/parse_address_test.cc6
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc8
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_test.cc6
-rw-r--r--test/core/client_channel/resolvers/fake_resolver_test.cc8
-rw-r--r--test/core/client_channel/resolvers/sockaddr_resolver_test.cc6
-rw-r--r--test/core/client_channel/uri_fuzzer_test.cc2
-rw-r--r--test/core/client_channel/uri_parser_test.cc10
-rw-r--r--test/core/compression/algorithm_test.cc4
-rw-r--r--test/core/compression/message_compress_test.cc16
-rw-r--r--test/core/debug/stats_test.cc6
-rw-r--r--test/core/end2end/bad_server_response_test.cc2
-rw-r--r--test/core/end2end/connection_refused_test.cc2
-rw-r--r--test/core/end2end/fixtures/h2_census.cc4
-rw-r--r--test/core/end2end/fixtures/h2_compress.cc6
-rw-r--r--test/core/end2end/fixtures/h2_fd.cc4
-rw-r--r--test/core/end2end/fixtures/h2_full+workarounds.cc2
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.cc2
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.cc2
-rw-r--r--test/core/end2end/fixtures/h2_sockpair+trace.cc8
-rw-r--r--test/core/end2end/fixtures/h2_sockpair.cc6
-rw-r--r--test/core/end2end/fixtures/h2_sockpair_1byte.cc6
-rw-r--r--test/core/end2end/fixtures/h2_ssl.cc2
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.cc4
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.cc13
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.cc14
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.cc4
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.cc4
-rw-r--r--test/core/end2end/h2_ssl_cert_test.cc2
-rw-r--r--test/core/end2end/tests/cancel_after_accept.cc2
-rw-r--r--test/core/end2end/tests/cancel_after_round_trip.cc2
-rw-r--r--test/core/end2end/tests/compressed_payload.cc6
-rw-r--r--test/core/end2end/tests/load_reporting_hook.cc2
-rw-r--r--test/core/end2end/tests/max_message_length.cc4
-rw-r--r--test/core/end2end/tests/stream_compression_compressed_payload.cc6
-rw-r--r--test/core/end2end/tests/stream_compression_payload.cc2
-rw-r--r--test/core/end2end/tests/stream_compression_ping_pong_streaming.cc2
-rw-r--r--test/core/end2end/tests/workaround_cronet_compression.cc4
-rw-r--r--test/core/http/httpcli_test.cc6
-rw-r--r--test/core/http/httpscli_test.cc6
-rw-r--r--test/core/iomgr/combiner_test.cc16
-rw-r--r--test/core/iomgr/endpoint_pair_test.cc4
-rw-r--r--test/core/iomgr/endpoint_tests.cc19
-rw-r--r--test/core/iomgr/ev_epollsig_linux_test.cc28
-rw-r--r--test/core/iomgr/fd_conservation_posix_test.cc4
-rw-r--r--test/core/iomgr/fd_posix_test.cc12
-rw-r--r--test/core/iomgr/pollset_set_test.cc36
-rw-r--r--test/core/iomgr/resolve_address_posix_test.cc14
-rw-r--r--test/core/iomgr/resolve_address_test.cc42
-rw-r--r--test/core/iomgr/resource_quota_test.cc112
-rw-r--r--test/core/iomgr/tcp_client_posix_test.cc12
-rw-r--r--test/core/iomgr/tcp_client_uv_test.cc10
-rw-r--r--test/core/iomgr/tcp_posix_test.cc18
-rw-r--r--test/core/iomgr/tcp_server_posix_test.cc15
-rw-r--r--test/core/iomgr/tcp_server_uv_test.cc12
-rw-r--r--test/core/iomgr/timer_list_test.cc18
-rw-r--r--test/core/iomgr/udp_server_test.cc18
-rw-r--r--test/core/security/credentials_test.cc70
-rw-r--r--test/core/security/json_token_test.cc4
-rw-r--r--test/core/security/jwt_verifier_test.cc26
-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.cc6
-rw-r--r--test/core/security/ssl_server_fuzzer.cc10
-rw-r--r--test/core/security/verify_jwt.cc4
-rw-r--r--test/core/slice/b64_test.cc8
-rw-r--r--test/core/slice/slice_hash_table_test.cc6
-rw-r--r--test/core/surface/byte_buffer_reader_test.cc2
-rw-r--r--test/core/surface/channel_create_test.cc2
-rw-r--r--test/core/surface/completion_queue_test.cc8
-rw-r--r--test/core/surface/completion_queue_threading_test.cc4
-rw-r--r--test/core/surface/concurrent_connectivity_test.cc6
-rw-r--r--test/core/surface/lame_client_test.cc2
-rw-r--r--test/core/surface/num_external_connectivity_watchers_test.cc2
-rw-r--r--test/core/surface/secure_channel_create_test.cc6
-rw-r--r--test/core/surface/sequential_connectivity_test.cc2
-rw-r--r--test/core/transport/bdp_estimator_test.cc4
-rw-r--r--test/core/transport/byte_stream_test.cc10
-rw-r--r--test/core/transport/chttp2/bin_decoder_test.cc2
-rw-r--r--test/core/transport/chttp2/hpack_encoder_test.cc2
-rw-r--r--test/core/transport/chttp2/hpack_parser_fuzzer_test.cc2
-rw-r--r--test/core/transport/chttp2/hpack_parser_test.cc4
-rw-r--r--test/core/transport/chttp2/hpack_table_test.cc8
-rw-r--r--test/core/transport/connectivity_state_test.cc16
-rw-r--r--test/core/transport/metadata_test.cc18
-rw-r--r--test/core/transport/status_conversion_test.cc2
-rw-r--r--test/core/util/port_server_client.cc24
-rw-r--r--test/core/util/test_tcp_server.cc6
93 files changed, 480 insertions, 469 deletions
diff --git a/test/core/backoff/backoff_test.cc b/test/core/backoff/backoff_test.cc
index 739ab86bb2..76a9f39c35 100644
--- a/test/core/backoff/backoff_test.cc
+++ b/test/core/backoff/backoff_test.cc
@@ -32,19 +32,23 @@ static void test_constant_backoff(void) {
const grpc_millis max_backoff = 1000;
grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
min_connect_timeout, max_backoff);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.current_deadline -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.next_attempt_start_time -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
for (int i = 0; i < 10000; i++) {
next_deadlines = grpc_backoff_step(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.current_deadline -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.next_attempt_start_time -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
}
}
@@ -57,15 +61,15 @@ static void test_min_connect(void) {
const grpc_millis max_backoff = 1000;
grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter,
min_connect_timeout, max_backoff);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_backoff_result next = grpc_backoff_begin(&backoff);
// Because the min_connect_timeout > initial_backoff, current_deadline is used
// as the deadline for the current attempt.
- GPR_ASSERT(next.current_deadline - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next.current_deadline - grpc_core::ExecCtx::Get()->Now() ==
min_connect_timeout);
// ... while, if the current attempt fails, the next one will happen after
// initial_backoff.
- GPR_ASSERT(next.next_attempt_start_time - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next.next_attempt_start_time - grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
}
@@ -80,45 +84,45 @@ static void test_no_jitter_backoff(void) {
min_connect_timeout, max_backoff);
// x_1 = 2
// x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 )
- ExecCtx _local_exec_ctx;
- ExecCtx::Get()->SetNow(0);
+ grpc_core::ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(0);
grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
GPR_ASSERT(next_deadlines.current_deadline ==
next_deadlines.next_attempt_start_time);
GPR_ASSERT(next_deadlines.current_deadline == 2);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 6);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 14);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 30);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 62);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 126);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 254);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 510);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 1022);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
// Hit the maximum timeout. From this point onwards, retries will increase
// only by max timeout.
GPR_ASSERT(next_deadlines.current_deadline == 1535);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 2048);
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
next_deadlines = grpc_backoff_step(&backoff);
GPR_ASSERT(next_deadlines.current_deadline == 2561);
}
@@ -136,11 +140,13 @@ static void test_jitter_backoff(void) {
backoff.rng_state = 0; // force consistent PRNG
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff);
- GPR_ASSERT(next_deadlines.current_deadline - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.current_deadline -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
- GPR_ASSERT(next_deadlines.next_attempt_start_time - ExecCtx::Get()->Now() ==
+ GPR_ASSERT(next_deadlines.next_attempt_start_time -
+ grpc_core::ExecCtx::Get()->Now() ==
initial_backoff);
grpc_millis expected_next_lower_bound =
@@ -153,7 +159,7 @@ static void test_jitter_backoff(void) {
// next-now must be within (jitter*100)% of the current backoff (which
// increases by * multiplier up to max_backoff).
const grpc_millis timeout_millis =
- next_deadlines.current_deadline - ExecCtx::Get()->Now();
+ next_deadlines.current_deadline - grpc_core::ExecCtx::Get()->Now();
GPR_ASSERT(timeout_millis >= expected_next_lower_bound);
GPR_ASSERT(timeout_millis <= expected_next_upper_bound);
current_backoff = GPR_MIN(
@@ -162,7 +168,7 @@ static void test_jitter_backoff(void) {
(grpc_millis)((double)current_backoff * (1 - jitter));
expected_next_upper_bound =
(grpc_millis)((double)current_backoff * (1 + jitter));
- ExecCtx::Get()->SetNow(next_deadlines.current_deadline);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(next_deadlines.current_deadline);
}
}
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index bc9e65089c..b7c9404638 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -57,7 +57,7 @@ static void done_write(void* arg, grpc_error* error) {
static void server_setup_transport(void* ts, grpc_transport* transport) {
thd_args* a = (thd_args*)ts;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_server_setup_transport(a->server, transport, NULL,
grpc_server_get_channel_args(a->server));
}
@@ -80,7 +80,7 @@ void grpc_run_bad_client_test(
grpc_slice_from_copied_buffer(client_payload, client_payload_length);
grpc_slice_buffer outgoing;
grpc_closure done_write_closure;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_completion_queue* shutdown_cq;
if (client_payload_length < 4 * 1024) {
diff --git a/test/core/channel/channel_args_test.cc b/test/core/channel/channel_args_test.cc
index f0393b0f40..eb2654e6a9 100644
--- a/test/core/channel/channel_args_test.cc
+++ b/test/core/channel/channel_args_test.cc
@@ -26,7 +26,7 @@
#include "test/core/util/test_config.h"
static void test_create(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_arg arg_int;
grpc_arg arg_string;
@@ -59,7 +59,7 @@ static void test_create(void) {
}
static void test_set_compression_algorithm(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args* ch_args;
ch_args =
@@ -73,7 +73,7 @@ static void test_set_compression_algorithm(void) {
}
static void test_compression_algorithm_states(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args *ch_args, *ch_args_wo_gzip, *ch_args_wo_gzip_deflate;
unsigned states_bitset;
size_t i;
@@ -134,7 +134,7 @@ static void test_set_socket_mutator(void) {
GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_POINTER);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(ch_args);
}
}
diff --git a/test/core/channel/channel_stack_test.cc b/test/core/channel/channel_stack_test.cc
index 66ee2948b1..21d7e89cb0 100644
--- a/test/core/channel/channel_stack_test.cc
+++ b/test/core/channel/channel_stack_test.cc
@@ -95,7 +95,7 @@ static void test_create_channel_stack(void) {
grpc_channel_args chan_args;
int* channel_data;
int* call_data;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice path = grpc_slice_from_static_string("/service/method");
arg.type = GRPC_ARG_INTEGER;
@@ -138,7 +138,7 @@ static void test_create_channel_stack(void) {
GPR_ASSERT(*channel_data == 1);
GRPC_CALL_STACK_UNREF(call_stack, "done");
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(*channel_data == 2);
GRPC_CHANNEL_STACK_UNREF(channel_stack, "done");
diff --git a/test/core/channel/minimal_stack_is_minimal_test.cc b/test/core/channel/minimal_stack_is_minimal_test.cc
index dd3c70a261..5aab969276 100644
--- a/test/core/channel/minimal_stack_is_minimal_test.cc
+++ b/test/core/channel/minimal_stack_is_minimal_test.cc
@@ -124,7 +124,7 @@ static int check_stack(const char* file, int line, const char* transport_name,
grpc_channel_stack_builder_set_transport(builder, &fake_transport);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_stack_builder_set_channel_arguments(builder, channel_args);
GPR_ASSERT(grpc_channel_init_create_stack(
builder, (grpc_channel_stack_type)channel_stack_type));
@@ -209,7 +209,7 @@ static int check_stack(const char* file, int line, const char* transport_name,
gpr_free(expect);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_stack_builder_destroy(builder);
grpc_channel_args_destroy(channel_args);
}
diff --git a/test/core/client_channel/lb_policies_test.cc b/test/core/client_channel/lb_policies_test.cc
index 5b412cc622..88e12ed8e1 100644
--- a/test/core/client_channel/lb_policies_test.cc
+++ b/test/core/client_channel/lb_policies_test.cc
@@ -651,7 +651,7 @@ static void test_get_channel_info() {
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);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
// Ensures that resolver returns.
@@ -958,7 +958,7 @@ static void verify_rebirth_round_robin(const servers_fixture* f,
}
int main(int argc, char** argv) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
test_spec* spec;
size_t i;
const size_t NUM_ITERS = 10;
diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc
index 597a1212c1..8f88083045 100644
--- a/test/core/client_channel/parse_address_test.cc
+++ b/test/core/client_channel/parse_address_test.cc
@@ -33,7 +33,7 @@
#ifdef GRPC_HAVE_UNIX_SOCKET
static void test_grpc_parse_unix(const char* uri_text, const char* pathname) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
grpc_resolved_address addr;
@@ -53,7 +53,7 @@ static void test_grpc_parse_unix(const char* uri_text, const char* pathname) {}
static void test_grpc_parse_ipv4(const char* uri_text, const char* host,
unsigned short port) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
grpc_resolved_address addr;
char ntop_buf[INET_ADDRSTRLEN];
@@ -71,7 +71,7 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host,
static void test_grpc_parse_ipv6(const char* uri_text, const char* host,
unsigned short port, uint32_t scope_id) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
grpc_resolved_address addr;
char ntop_buf[INET6_ADDRSTRLEN];
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
index c7a0e029f2..1f00d9ab43 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
@@ -104,7 +104,7 @@ static bool wait_loop(int deadline_seconds, gpr_event* ev) {
if (gpr_event_wait(ev, grpc_timeout_seconds_to_deadline(1))) return true;
deadline_seconds--;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_timer_check(NULL);
}
return false;
@@ -146,14 +146,14 @@ int main(int argc, char** argv) {
grpc_dns_lookup_ares = my_dns_lookup_ares;
grpc_channel_args* result = (grpc_channel_args*)1;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolver* resolver = create_resolver("dns:test");
gpr_event ev1;
gpr_event_init(&ev1);
call_resolver_next_after_locking(
resolver, &result,
GRPC_CLOSURE_CREATE(on_done, &ev1, grpc_schedule_on_exec_ctx));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(wait_loop(5, &ev1));
GPR_ASSERT(result == NULL);
@@ -162,7 +162,7 @@ int main(int argc, char** argv) {
call_resolver_next_after_locking(
resolver, &result,
GRPC_CLOSURE_CREATE(on_done, &ev2, grpc_schedule_on_exec_ctx));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(wait_loop(30, &ev2));
GPR_ASSERT(result != NULL);
diff --git a/test/core/client_channel/resolvers/dns_resolver_test.cc b/test/core/client_channel/resolvers/dns_resolver_test.cc
index 33916b59ec..e8900ab1bb 100644
--- a/test/core/client_channel/resolvers/dns_resolver_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_test.cc
@@ -28,7 +28,7 @@
static grpc_combiner* g_combiner;
static void test_succeeds(grpc_resolver_factory* factory, const char* string) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver* resolver;
@@ -45,7 +45,7 @@ static void test_succeeds(grpc_resolver_factory* factory, const char* string) {
}
static void test_fails(grpc_resolver_factory* factory, const char* string) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver* resolver;
@@ -80,7 +80,7 @@ int main(int argc, char** argv) {
grpc_resolver_factory_unref(dns);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_COMBINER_UNREF(g_combiner, "test");
}
grpc_shutdown();
diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc
index 9a1971561c..1595313f36 100644
--- a/test/core/client_channel/resolvers/fake_resolver_test.cc
+++ b/test/core/client_channel/resolvers/fake_resolver_test.cc
@@ -72,7 +72,7 @@ void on_resolution_cb(void* arg, grpc_error* error) {
}
static void test_fake_resolver() {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_combiner* combiner = grpc_combiner_create();
// Create resolver.
grpc_fake_resolver_response_generator* response_generator =
@@ -109,7 +109,7 @@ static void test_fake_resolver() {
results);
grpc_resolver_next_locked(resolver, &on_res_arg.resolver_result,
on_resolution);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(gpr_event_wait(&on_res_arg.ev,
grpc_timeout_seconds_to_deadline(5)) != NULL);
@@ -144,7 +144,7 @@ static void test_fake_resolver() {
results_update);
grpc_resolver_next_locked(resolver, &on_res_arg_update.resolver_result,
on_resolution);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(gpr_event_wait(&on_res_arg_update.ev,
grpc_timeout_seconds_to_deadline(5)) != NULL);
@@ -153,7 +153,7 @@ static void test_fake_resolver() {
memset(&on_res_arg, 0, sizeof(on_res_arg));
grpc_resolver_next_locked(resolver, &on_res_arg.resolver_result,
on_resolution);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(gpr_event_wait(&on_res_arg.ev,
grpc_timeout_milliseconds_to_deadline(100)) ==
NULL);
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
index 70b3cbf5b7..7584901813 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
@@ -41,7 +41,7 @@ void on_resolution_cb(void* arg, grpc_error* error) {
}
static void test_succeeds(grpc_resolver_factory* factory, const char* string) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver* resolver;
@@ -68,7 +68,7 @@ static void test_succeeds(grpc_resolver_factory* factory, const char* string) {
}
static void test_fails(grpc_resolver_factory* factory, const char* string) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(string, 0);
grpc_resolver_args args;
grpc_resolver* resolver;
@@ -111,7 +111,7 @@ int main(int argc, char** argv) {
grpc_resolver_factory_unref(ipv6);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_COMBINER_UNREF(g_combiner, "test");
}
grpc_shutdown();
diff --git a/test/core/client_channel/uri_fuzzer_test.cc b/test/core/client_channel/uri_fuzzer_test.cc
index 6c1e8cb137..484676e472 100644
--- a/test/core/client_channel/uri_fuzzer_test.cc
+++ b/test/core/client_channel/uri_fuzzer_test.cc
@@ -33,7 +33,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
memcpy(s, data, size);
s[size] = 0;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* x;
if ((x = grpc_uri_parse(s, 1))) {
grpc_uri_destroy(x);
diff --git a/test/core/client_channel/uri_parser_test.cc b/test/core/client_channel/uri_parser_test.cc
index 024c30faee..61418ae7d8 100644
--- a/test/core/client_channel/uri_parser_test.cc
+++ b/test/core/client_channel/uri_parser_test.cc
@@ -28,7 +28,7 @@
static void test_succeeds(const char* uri_text, const char* scheme,
const char* authority, const char* path,
const char* query, const char* fragment) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
GPR_ASSERT(uri);
GPR_ASSERT(0 == strcmp(scheme, uri->scheme));
@@ -41,13 +41,13 @@ static void test_succeeds(const char* uri_text, const char* scheme,
}
static void test_fails(const char* uri_text) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(NULL == grpc_uri_parse(uri_text, 0));
}
static void test_query_parts() {
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
const char* uri_text = "http://foo/path?a&b=B&c=&#frag";
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
GPR_ASSERT(uri);
@@ -81,7 +81,7 @@ static void test_query_parts() {
}
{
/* test the current behavior of multiple query part values */
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
const char* uri_text = "http://auth/path?foo=bar=baz&foobar==";
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
GPR_ASSERT(uri);
@@ -99,7 +99,7 @@ static void test_query_parts() {
}
{
/* empty query */
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
const char* uri_text = "http://foo/path";
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
GPR_ASSERT(uri);
diff --git a/test/core/compression/algorithm_test.cc b/test/core/compression/algorithm_test.cc
index 9ae6363d97..a6fc55e682 100644
--- a/test/core/compression/algorithm_test.cc
+++ b/test/core/compression/algorithm_test.cc
@@ -39,7 +39,7 @@ static void test_algorithm_mesh(void) {
grpc_compression_algorithm parsed;
grpc_slice mdstr;
grpc_mdelem mdelem;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(
grpc_compression_algorithm_name((grpc_compression_algorithm)i, &name));
GPR_ASSERT(grpc_compression_algorithm_parse(
@@ -61,7 +61,7 @@ static void test_algorithm_mesh(void) {
}
static void test_algorithm_failure(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice mdstr;
gpr_log(GPR_DEBUG, "test_algorithm_failure");
diff --git a/test/core/compression/message_compress_test.cc b/test/core/compression/message_compress_test.cc
index a5dfdc884f..0145b4f402 100644
--- a/test/core/compression/message_compress_test.cc
+++ b/test/core/compression/message_compress_test.cc
@@ -70,7 +70,7 @@ static void assert_passthrough(grpc_slice value,
grpc_split_slices_to_buffer(uncompressed_split_mode, &value, 1, &input);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
was_compressed = grpc_msg_compress(algorithm, &input, &compressed_raw);
}
GPR_ASSERT(input.count > 0);
@@ -90,7 +90,7 @@ static void assert_passthrough(grpc_slice value,
grpc_split_slice_buffer(compressed_split_mode, &compressed_raw, &compressed);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(grpc_msg_decompress(
was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output));
}
@@ -152,7 +152,7 @@ static void test_tiny_data_compress(void) {
for (int i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) {
if (i == GRPC_COMPRESS_NONE) continue;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(0 ==
grpc_msg_compress(static_cast<grpc_compression_algorithm>(i),
&input, &output));
@@ -176,7 +176,7 @@ static void test_bad_decompression_data_crc(void) {
grpc_slice_buffer_init(&output);
grpc_slice_buffer_add(&input, create_test_value(ONE_MB_A));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* compress it */
grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted);
/* corrupt the output by smashing the CRC */
@@ -205,7 +205,7 @@ static void test_bad_decompression_data_trailing_garbage(void) {
"\x78\xda\x63\x60\x60\x60\x00\x00\x00\x04\x00\x01\x99", 13));
/* try (and fail) to decompress the invalid compresed buffer */
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output));
grpc_slice_buffer_destroy(&input);
@@ -222,7 +222,7 @@ static void test_bad_decompression_data_stream(void) {
grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4));
/* try (and fail) to decompress the invalid compresed buffer */
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output));
grpc_slice_buffer_destroy(&input);
@@ -239,7 +239,7 @@ static void test_bad_compression_algorithm(void) {
grpc_slice_buffer_add(
&input, grpc_slice_from_copied_string("Never gonna give you up"));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
was_compressed =
grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_compressed);
@@ -263,7 +263,7 @@ static void test_bad_decompression_algorithm(void) {
grpc_slice_buffer_add(&input,
grpc_slice_from_copied_string(
"I'm not really compressed but it doesn't matter"));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
was_decompressed =
grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output);
GPR_ASSERT(0 == was_decompressed);
diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc
index c7aaf68dd3..a3bb44f496 100644
--- a/test/core/debug/stats_test.cc
+++ b/test/core/debug/stats_test.cc
@@ -49,7 +49,7 @@ TEST(StatsTest, IncCounters) {
for (int i = 0; i < GRPC_STATS_COUNTER_COUNT; i++) {
Snapshot snapshot;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_STATS_INC_COUNTER((grpc_stats_counters)i);
EXPECT_EQ(snapshot.delta().counters[i], 1);
@@ -59,7 +59,7 @@ TEST(StatsTest, IncCounters) {
TEST(StatsTest, IncSpecificCounter) {
Snapshot snapshot;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_STATS_INC_SYSCALL_POLL();
EXPECT_EQ(snapshot.delta().counters[GRPC_STATS_COUNTER_SYSCALL_POLL], 1);
@@ -92,7 +92,7 @@ TEST_P(HistogramTest, IncHistogram) {
for (auto j : test_values) {
Snapshot snapshot;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_stats_inc_histogram[kHistogram](j);
auto delta = snapshot.delta();
diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc
index 5e7e12643e..bb192267c7 100644
--- a/test/core/end2end/bad_server_response_test.cc
+++ b/test/core/end2end/bad_server_response_test.cc
@@ -269,7 +269,7 @@ static void run_test(const char* response_payload,
grpc_status_code expected_status,
const char* expected_detail) {
test_tcp_server test_server;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_event ev;
grpc_init();
diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc
index 1372c5a746..2c4163ea02 100644
--- a/test/core/end2end/connection_refused_test.cc
+++ b/test/core/end2end/connection_refused_test.cc
@@ -131,7 +131,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
grpc_metadata_array_destroy(&trailing_metadata_recv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
if (args != NULL) grpc_channel_args_destroy(args);
}
diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc
index a43d963c54..885b2b22b9 100644
--- a/test/core/end2end/fixtures/h2_census.cc
+++ b/test/core/end2end/fixtures/h2_census.cc
@@ -74,7 +74,7 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
}
}
@@ -90,7 +90,7 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1);
f->server = grpc_server_create(server_args, NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(server_args);
}
grpc_server_register_completion_queue(f->server, f->cq, NULL);
diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc
index 3f9a87d0fc..6fea4d40e0 100644
--- a/test/core/end2end/fixtures/h2_compress.cc
+++ b/test/core/end2end/fixtures/h2_compress.cc
@@ -66,7 +66,7 @@ void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture* f,
fullstack_compression_fixture_data* ffd =
static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
if (ffd->client_args_compression != NULL) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(ffd->client_args_compression);
}
ffd->client_args_compression = grpc_channel_args_set_compression_algorithm(
@@ -80,7 +80,7 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f,
fullstack_compression_fixture_data* ffd =
static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
if (ffd->server_args_compression != NULL) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(ffd->server_args_compression);
}
ffd->server_args_compression = grpc_channel_args_set_compression_algorithm(
@@ -95,7 +95,7 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f,
}
void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture* f) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
fullstack_compression_fixture_data* ffd =
static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
grpc_channel_args_destroy(ffd->client_args_compression);
diff --git a/test/core/end2end/fixtures/h2_fd.cc b/test/core/end2end/fixtures/h2_fd.cc
index 99bced8651..62cc0f6f8f 100644
--- a/test/core/end2end/fixtures/h2_fd.cc
+++ b/test/core/end2end/fixtures/h2_fd.cc
@@ -68,7 +68,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* client_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data);
GPR_ASSERT(!f->client);
@@ -79,7 +79,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* server_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data);
GPR_ASSERT(!f->server);
f->server = grpc_server_create(server_args, NULL);
diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc
index e98df083f2..074ba289c9 100644
--- a/test/core/end2end/fixtures/h2_full+workarounds.cc
+++ b/test/core/end2end/fixtures/h2_full+workarounds.cc
@@ -71,7 +71,7 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
grpc_channel_args* server_args) {
int i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
fullstack_fixture_data* ffd =
static_cast<fullstack_fixture_data*>(f->fixture_data);
grpc_arg args[GRPC_MAX_WORKAROUND_ID];
diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc
index 84eb9e4513..846319285e 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.cc
+++ b/test/core/end2end/fixtures/h2_load_reporting.cc
@@ -77,7 +77,7 @@ void chttp2_init_server_load_reporting(grpc_end2end_test_fixture* f,
server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1);
f->server = grpc_server_create(server_args, NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(server_args);
}
grpc_server_register_completion_queue(f->server, f->cq, NULL);
diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc
index 9ffc5b7b7e..b648a1be4d 100644
--- a/test/core/end2end/fixtures/h2_oauth2.cc
+++ b/test/core/end2end/fixtures/h2_oauth2.cc
@@ -143,7 +143,7 @@ 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) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
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(
diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.cc b/test/core/end2end/fixtures/h2_sockpair+trace.cc
index 9e87a22962..c18f815f9f 100644
--- a/test/core/end2end/fixtures/h2_sockpair+trace.cc
+++ b/test/core/end2end/fixtures/h2_sockpair+trace.cc
@@ -50,7 +50,7 @@
static void server_setup_transport(void* ts, grpc_transport* transport) {
grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq));
grpc_server_setup_transport(f->server, transport, NULL,
@@ -87,7 +87,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* client_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
sp_client_setup cs;
@@ -101,7 +101,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* server_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
GPR_ASSERT(!f->server);
@@ -126,7 +126,7 @@ static grpc_end2end_test_config configs[] = {
int main(int argc, char** argv) {
size_t i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* force tracing on, with a value to force many
code paths in trace.c to be taken */
diff --git a/test/core/end2end/fixtures/h2_sockpair.cc b/test/core/end2end/fixtures/h2_sockpair.cc
index fa69ad84cf..6c34dbba6f 100644
--- a/test/core/end2end/fixtures/h2_sockpair.cc
+++ b/test/core/end2end/fixtures/h2_sockpair.cc
@@ -44,7 +44,7 @@
static void server_setup_transport(void* ts, grpc_transport* transport) {
grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq));
grpc_server_setup_transport(f->server, transport, NULL,
@@ -81,7 +81,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* client_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
sp_client_setup cs;
@@ -95,7 +95,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* server_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
GPR_ASSERT(!f->server);
diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.cc b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
index a12d60575b..909a2db8aa 100644
--- a/test/core/end2end/fixtures/h2_sockpair_1byte.cc
+++ b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
@@ -44,7 +44,7 @@
static void server_setup_transport(void* ts, grpc_transport* transport) {
grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq));
grpc_server_setup_transport(f->server, transport, NULL,
@@ -92,7 +92,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* client_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
sp_client_setup cs;
@@ -106,7 +106,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
grpc_channel_args* server_args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
grpc_transport* transport;
GPR_ASSERT(!f->server);
diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc
index c137cec8b9..ea8286c9e7 100644
--- a/test/core/end2end/fixtures/h2_ssl.cc
+++ b/test/core/end2end/fixtures/h2_ssl.cc
@@ -110,7 +110,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack(
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(new_client_args);
}
}
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.cc b/test/core/end2end/fixtures/h2_ssl_proxy.cc
index 0c130d6ae1..d50cd5c9e3 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.cc
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.cc
@@ -66,7 +66,7 @@ static grpc_channel* create_proxy_client(const char* target,
grpc_secure_channel_create(ssl_creds, target, new_client_args, NULL);
grpc_channel_credentials_release(ssl_creds);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(new_client_args);
}
return channel;
@@ -147,7 +147,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack(
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(new_client_args);
}
}
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index 73a3e2c444..698282d990 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -391,7 +391,8 @@ static void on_read_request_done(void* arg, grpc_error* error) {
GPR_ASSERT(resolved_addresses->naddrs >= 1);
// Connect to requested address.
// The connection callback inherits our reference to conn.
- const grpc_millis deadline = ExecCtx::Get()->Now() + 10 * GPR_MS_PER_SEC;
+ const grpc_millis deadline =
+ grpc_core::ExecCtx::Get()->Now() + 10 * GPR_MS_PER_SEC;
grpc_tcp_client_connect(&conn->on_server_connect_done, &conn->server_endpoint,
conn->pollset_set, NULL,
&resolved_addresses->addrs[0], deadline);
@@ -444,7 +445,7 @@ static void on_accept(void* arg, grpc_endpoint* endpoint,
static void thread_main(void* arg) {
grpc_end2end_http_proxy* proxy = (grpc_end2end_http_proxy*)arg;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
do {
gpr_ref(&proxy->users);
grpc_pollset_worker* worker = NULL;
@@ -452,15 +453,15 @@ static void thread_main(void* arg) {
GRPC_LOG_IF_ERROR(
"grpc_pollset_work",
grpc_pollset_work(proxy->pollset, &worker,
- ExecCtx::Get()->Now() + GPR_MS_PER_SEC));
+ grpc_core::ExecCtx::Get()->Now() + GPR_MS_PER_SEC));
gpr_mu_unlock(proxy->mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
} while (!gpr_unref(&proxy->users));
}
grpc_end2end_http_proxy* grpc_end2end_http_proxy_create(
grpc_channel_args* args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_end2end_http_proxy* proxy =
(grpc_end2end_http_proxy*)gpr_malloc(sizeof(*proxy));
memset(proxy, 0, sizeof(*proxy));
@@ -505,7 +506,7 @@ static void destroy_pollset(void* arg, grpc_error* error) {
void grpc_end2end_http_proxy_destroy(grpc_end2end_http_proxy* proxy) {
gpr_unref(&proxy->users); // Signal proxy thread to shutdown.
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_thd_join(proxy->thd);
grpc_tcp_server_shutdown_listeners(proxy->server);
grpc_tcp_server_unref(proxy->server);
diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc
index 1d22ba3a42..3fb6d0fdb6 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.cc
+++ b/test/core/end2end/fuzzers/api_fuzzer.cc
@@ -411,7 +411,7 @@ void my_resolve_address(const char* addr, const char* default_port,
r->addrs = addresses;
r->lb_addrs = NULL;
grpc_timer_init(
- &r->timer, GPR_MS_PER_SEC + ExecCtx::Get()->Now(),
+ &r->timer, GPR_MS_PER_SEC + grpc_core::ExecCtx::Get()->Now(),
GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
}
@@ -428,7 +428,7 @@ grpc_ares_request* my_dns_lookup_ares(const char* dns_server, const char* addr,
r->addrs = NULL;
r->lb_addrs = lb_addrs;
grpc_timer_init(
- &r->timer, GPR_MS_PER_SEC + ExecCtx::Get()->Now(),
+ &r->timer, GPR_MS_PER_SEC + grpc_core::ExecCtx::Get()->Now(),
GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
return NULL;
}
@@ -488,7 +488,7 @@ static void sched_connect(grpc_closure* closure, grpc_endpoint** ep,
fc->ep = ep;
fc->deadline = deadline;
grpc_timer_init(
- &fc->timer, GPR_MS_PER_SEC + ExecCtx::Get()->Now(),
+ &fc->timer, GPR_MS_PER_SEC + grpc_core::ExecCtx::Get()->Now(),
GRPC_CLOSURE_CREATE(do_connect, fc, grpc_schedule_on_exec_ctx));
}
@@ -743,7 +743,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_init();
grpc_timer_manager_set_threading(false);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_executor_set_threading(false);
}
grpc_resolve_address = my_resolve_address;
@@ -837,7 +837,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
g_channel = grpc_insecure_channel_create(target_uri, args, NULL);
GPR_ASSERT(g_channel != NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
gpr_free(target_uri);
@@ -864,7 +864,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
g_server = grpc_server_create(args, NULL);
GPR_ASSERT(g_server != NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
grpc_server_register_completion_queue(g_server, cq, NULL);
@@ -1192,7 +1192,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
g_channel = grpc_secure_channel_create(creds, target_uri, args, NULL);
GPR_ASSERT(g_channel != NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
gpr_free(target_uri);
diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc
index 95ed2fcdac..318e8129d0 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.cc
+++ b/test/core/end2end/fuzzers/client_fuzzer.cc
@@ -43,7 +43,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
if (leak_check) grpc_memory_counters_init();
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_executor_set_threading(false);
grpc_resource_quota* resource_quota =
@@ -111,7 +111,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_event ev;
while (1) {
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc
index 21778c0a67..dca3ff498e 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.cc
+++ b/test/core/end2end/fuzzers/server_fuzzer.cc
@@ -41,7 +41,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
if (leak_check) grpc_memory_counters_init();
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_executor_set_threading(false);
grpc_resource_quota* resource_quota =
@@ -78,7 +78,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_event ev;
while (1) {
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc
index e0da548a75..97c0692711 100644
--- a/test/core/end2end/h2_ssl_cert_test.cc
+++ b/test/core/end2end/h2_ssl_cert_test.cc
@@ -181,7 +181,7 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype;
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \
{ \
- ExecCtx _local_exec_ctx; \
+ grpc_core::ExecCtx _local_exec_ctx; \
grpc_channel_args_destroy(new_client_args); \
} \
}
diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc
index ffafb1f1e9..45ea2b9906 100644
--- a/test/core/end2end/tests/cancel_after_accept.cc
+++ b/test/core/end2end/tests/cancel_after_accept.cc
@@ -245,7 +245,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_call_unref(s);
if (args != NULL) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc
index 7e20487f8b..231aa7abbc 100644
--- a/test/core/end2end/tests/cancel_after_round_trip.cc
+++ b/test/core/end2end/tests/cancel_after_round_trip.cc
@@ -277,7 +277,7 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config,
grpc_call_unref(s);
if (args != NULL) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(args);
}
diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc
index f04addbe9e..aa3523a987 100644
--- a/test/core/end2end/tests/compressed_payload.cc
+++ b/test/core/end2end/tests/compressed_payload.cc
@@ -129,7 +129,7 @@ static void request_for_disabled_algorithm(
server_args =
grpc_channel_args_set_compression_algorithm(NULL, GRPC_COMPRESS_NONE);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
server_args = grpc_channel_args_compression_algorithm_set_state(
&server_args, algorithm_to_disable, false);
}
@@ -256,7 +256,7 @@ static void request_for_disabled_algorithm(
grpc_byte_buffer_destroy(request_payload_recv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
@@ -534,7 +534,7 @@ static void request_with_payload_template(
cq_verifier_destroy(cqv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/end2end/tests/load_reporting_hook.cc b/test/core/end2end/tests/load_reporting_hook.cc
index 6ce22d77c6..34c046d364 100644
--- a/test/core/end2end/tests/load_reporting_hook.cc
+++ b/test/core/end2end/tests/load_reporting_hook.cc
@@ -300,7 +300,7 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) {
&trailing_lr_metadata);
end_test(&f);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(lr_server_args);
}
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc
index f884d8b11f..808cf470e1 100644
--- a/test/core/end2end/tests/max_message_length.cc
+++ b/test/core/end2end/tests/max_message_length.cc
@@ -173,7 +173,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
f = begin_test(config, "test_max_request_message_length", client_args,
server_args);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
if (client_args != NULL) grpc_channel_args_destroy(client_args);
if (server_args != NULL) grpc_channel_args_destroy(server_args);
}
@@ -363,7 +363,7 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
f = begin_test(config, "test_max_response_message_length", client_args,
server_args);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
if (client_args != NULL) grpc_channel_args_destroy(client_args);
if (server_args != NULL) grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.cc b/test/core/end2end/tests/stream_compression_compressed_payload.cc
index cec46305bd..d118aceeb1 100644
--- a/test/core/end2end/tests/stream_compression_compressed_payload.cc
+++ b/test/core/end2end/tests/stream_compression_compressed_payload.cc
@@ -129,7 +129,7 @@ static void request_for_disabled_algorithm(
server_args = grpc_channel_args_set_stream_compression_algorithm(
NULL, GRPC_STREAM_COMPRESS_NONE);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
server_args = grpc_channel_args_stream_compression_algorithm_set_state(
&server_args, algorithm_to_disable, false);
}
@@ -257,7 +257,7 @@ static void request_for_disabled_algorithm(
grpc_byte_buffer_destroy(request_payload_recv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
@@ -542,7 +542,7 @@ static void request_with_payload_template(
cq_verifier_destroy(cqv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/end2end/tests/stream_compression_payload.cc b/test/core/end2end/tests/stream_compression_payload.cc
index c304c990d7..6bd1e99ca1 100644
--- a/test/core/end2end/tests/stream_compression_payload.cc
+++ b/test/core/end2end/tests/stream_compression_payload.cc
@@ -277,7 +277,7 @@ static void test_invoke_request_response_with_payload(
end_test(&f);
config.tear_down_data(&f);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
index f4b737d7a3..2504c791e6 100644
--- a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
+++ b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
@@ -273,7 +273,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
end_test(&f);
config.tear_down_data(&f);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/end2end/tests/workaround_cronet_compression.cc b/test/core/end2end/tests/workaround_cronet_compression.cc
index 100f393b8e..723d3274e2 100644
--- a/test/core/end2end/tests/workaround_cronet_compression.cc
+++ b/test/core/end2end/tests/workaround_cronet_compression.cc
@@ -142,7 +142,7 @@ static void request_with_payload_template(
NULL, default_server_channel_compression_algorithm);
if (user_agent_override) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args* client_args_old = client_args;
grpc_arg arg;
arg.key = const_cast<char*>(GRPC_ARG_PRIMARY_USER_AGENT_STRING);
@@ -348,7 +348,7 @@ static void request_with_payload_template(
cq_verifier_destroy(cqv);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(client_args);
grpc_channel_args_destroy(server_args);
}
diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc
index dfa328360d..4f9421e6d4 100644
--- a/test/core/http/httpcli_test.cc
+++ b/test/core/http/httpcli_test.cc
@@ -60,7 +60,7 @@ static void on_finish(void* arg, grpc_error* error) {
static void test_get(int port) {
grpc_httpcli_request req;
char* host;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
g_done = 0;
gpr_log(GPR_INFO, "test_get");
@@ -99,7 +99,7 @@ static void test_get(int port) {
static void test_post(int port) {
grpc_httpcli_request req;
char* host;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
g_done = 0;
gpr_log(GPR_INFO, "test_post");
@@ -142,7 +142,7 @@ static void destroy_pops(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_subprocess* server;
char* me = argv[0];
char* lslash = strrchr(me, '/');
diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc
index ff082e8367..fb69fc97d1 100644
--- a/test/core/http/httpscli_test.cc
+++ b/test/core/http/httpscli_test.cc
@@ -60,7 +60,7 @@ static void on_finish(void* arg, grpc_error* error) {
static void test_get(int port) {
grpc_httpcli_request req;
char* host;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
g_done = 0;
gpr_log(GPR_INFO, "test_get");
@@ -100,7 +100,7 @@ static void test_get(int port) {
static void test_post(int port) {
grpc_httpcli_request req;
char* host;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
g_done = 0;
gpr_log(GPR_INFO, "test_post");
@@ -144,7 +144,7 @@ static void destroy_pops(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_subprocess* server;
char* me = argv[0];
char* lslash = strrchr(me, '/');
diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc
index df8d55f1f6..cf2bc0ce06 100644
--- a/test/core/iomgr/combiner_test.cc
+++ b/test/core/iomgr/combiner_test.cc
@@ -28,7 +28,7 @@
static void test_no_op(void) {
gpr_log(GPR_DEBUG, "test_no_op");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_COMBINER_UNREF(grpc_combiner_create(), "test_no_op");
}
@@ -42,11 +42,11 @@ static void test_execute_one(void) {
grpc_combiner* lock = grpc_combiner_create();
gpr_event done;
gpr_event_init(&done);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(set_event_to_true, &done,
grpc_combiner_scheduler(lock)),
GRPC_ERROR_NONE);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(gpr_event_wait(&done, grpc_timeout_seconds_to_deadline(5)) !=
NULL);
GRPC_COMBINER_UNREF(lock, "test_execute_one");
@@ -72,7 +72,7 @@ static void check_one(void* a, grpc_error* error) {
static void execute_many_loop(void* a) {
thd_args* args = static_cast<thd_args*>(a);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
size_t n = 1;
for (size_t i = 0; i < 10; i++) {
for (size_t j = 0; j < 10000; j++) {
@@ -82,7 +82,7 @@ static void execute_many_loop(void* a) {
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(
check_one, c, grpc_combiner_scheduler(args->lock)),
GRPC_ERROR_NONE);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
// sleep for a little bit, to test a combiner draining and another thread
// picking it up
@@ -112,7 +112,7 @@ static void test_execute_many(void) {
gpr_inf_future(GPR_CLOCK_REALTIME)) != NULL);
gpr_thd_join(thds[i]);
}
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_COMBINER_UNREF(lock, "test_execute_many");
}
@@ -133,12 +133,12 @@ static void test_execute_finally(void) {
gpr_log(GPR_DEBUG, "test_execute_finally");
grpc_combiner* lock = grpc_combiner_create();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_event_init(&got_in_finally);
GRPC_CLOSURE_SCHED(
GRPC_CLOSURE_CREATE(add_finally, lock, grpc_combiner_scheduler(lock)),
GRPC_ERROR_NONE);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(gpr_event_wait(&got_in_finally,
grpc_timeout_seconds_to_deadline(5)) != NULL);
GRPC_COMBINER_UNREF(lock, "test_execute_finally");
diff --git a/test/core/iomgr/endpoint_pair_test.cc b/test/core/iomgr/endpoint_pair_test.cc
index 72833a8dbe..658971b9fb 100644
--- a/test/core/iomgr/endpoint_pair_test.cc
+++ b/test/core/iomgr/endpoint_pair_test.cc
@@ -32,7 +32,7 @@ static void clean_up(void) {}
static grpc_endpoint_test_fixture create_fixture_endpoint_pair(
size_t slice_size) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_test_fixture f;
grpc_arg a[1];
a[0].key = const_cast<char*>(GRPC_ARG_TCP_READ_CHUNK_SIZE);
@@ -59,7 +59,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc
index 5c156ef524..e000eb289b 100644
--- a/test/core/iomgr/endpoint_tests.cc
+++ b/test/core/iomgr/endpoint_tests.cc
@@ -173,7 +173,7 @@ static void read_and_write_test(grpc_endpoint_test_config config,
struct read_and_write_test_state state;
grpc_endpoint_test_fixture f =
begin_test(config, "read_and_write_test", slice_size);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
gpr_log(GPR_DEBUG,
@@ -213,7 +213,7 @@ static void read_and_write_test(grpc_endpoint_test_config config,
even when bytes_written is unsigned. */
state.bytes_written -= state.current_write_size;
read_and_write_test_write_handler(&state, GRPC_ERROR_NONE);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_endpoint_read(state.read_ep, &state.incoming, &state.done_read);
@@ -225,17 +225,17 @@ static void read_and_write_test(grpc_endpoint_test_config config,
grpc_endpoint_shutdown(
state.write_ep, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Test Shutdown"));
}
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
while (!state.read_done || !state.write_done) {
grpc_pollset_worker* worker = NULL;
- GPR_ASSERT(ExecCtx::Get()->Now() < deadline);
+ GPR_ASSERT(grpc_core::ExecCtx::Get()->Now() < deadline);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", grpc_pollset_work(g_pollset, &worker, deadline)));
}
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
end_test(config);
grpc_slice_buffer_destroy_internal(&state.outgoing);
@@ -252,16 +252,17 @@ static void inc_on_failure(void* arg, grpc_error* error) {
}
static void wait_for_fail_count(int* fail_count, int want_fail_count) {
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
- while (ExecCtx::Get()->Now() < deadline && *fail_count < want_fail_count) {
+ while (grpc_core::ExecCtx::Get()->Now() < deadline &&
+ *fail_count < want_fail_count) {
grpc_pollset_worker* worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", grpc_pollset_work(g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
GPR_ASSERT(*fail_count == want_fail_count);
@@ -276,7 +277,7 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) {
grpc_slice_buffer slice_buffer;
grpc_slice_buffer_init(&slice_buffer);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_endpoint_add_to_pollset(f.client_ep, g_pollset);
grpc_endpoint_read(f.client_ep, &slice_buffer,
GRPC_CLOSURE_CREATE(inc_on_failure, &fail_count,
diff --git a/test/core/iomgr/ev_epollsig_linux_test.cc b/test/core/iomgr/ev_epollsig_linux_test.cc
index 5c71bc6152..8aa68c6f6f 100644
--- a/test/core/iomgr/ev_epollsig_linux_test.cc
+++ b/test/core/iomgr/ev_epollsig_linux_test.cc
@@ -77,11 +77,11 @@ static void test_fd_cleanup(test_fd* tfds, int num_fds) {
for (i = 0; i < num_fds; i++) {
grpc_fd_shutdown(tfds[i].fd,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("test_fd_cleanup"));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_fd_orphan(tfds[i].fd, NULL, &release_fd, false /* already_closed */,
"test_fd_cleanup");
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(release_fd == tfds[i].inner_fd);
close(tfds[i].inner_fd);
@@ -110,7 +110,7 @@ static void test_pollset_cleanup(test_pollset* pollsets, int num_pollsets) {
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(pollsets[i].pollset, &destroyed);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_free(pollsets[i].pollset);
}
}
@@ -130,7 +130,7 @@ static void test_pollset_cleanup(test_pollset* pollsets, int num_pollsets) {
#define NUM_POLLSETS 4
static void test_add_fd_to_pollset() {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
test_fd tfds[NUM_FDS];
int fds[NUM_FDS];
test_pollset pollsets[NUM_POLLSETS];
@@ -168,32 +168,32 @@ static void test_add_fd_to_pollset() {
/* == Step 1 == */
for (i = 0; i <= 2; i++) {
grpc_pollset_add_fd(pollsets[0].pollset, tfds[i].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
for (i = 3; i <= 4; i++) {
grpc_pollset_add_fd(pollsets[1].pollset, tfds[i].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
for (i = 5; i <= 7; i++) {
grpc_pollset_add_fd(pollsets[2].pollset, tfds[i].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
/* == Step 2 == */
for (i = 0; i <= 1; i++) {
grpc_pollset_add_fd(pollsets[3].pollset, tfds[i].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
/* == Step 3 == */
grpc_pollset_add_fd(pollsets[1].pollset, tfds[0].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* == Step 4 == */
grpc_pollset_add_fd(pollsets[2].pollset, tfds[3].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* All polling islands are merged at this point */
@@ -231,7 +231,7 @@ static __thread int thread_wakeups = 0;
static void test_threading_loop(void* arg) {
threading_shared* shared = static_cast<threading_shared*>(arg);
while (thread_wakeups < 1000000) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_worker* worker;
gpr_mu_lock(shared->mu);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
@@ -271,7 +271,7 @@ static void test_threading(void) {
shared.wakeup_desc = grpc_fd_create(fd.read_fd, "wakeup");
shared.wakeups = 0;
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_add_fd(shared.pollset, shared.wakeup_desc);
grpc_fd_notify_on_read(
shared.wakeup_desc,
@@ -286,7 +286,7 @@ static void test_threading(void) {
fd.read_fd = 0;
grpc_wakeup_fd_destroy(&fd);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_fd_shutdown(shared.wakeup_desc, GRPC_ERROR_CANCELLED);
grpc_fd_orphan(shared.wakeup_desc, NULL, NULL, false /* already_closed */,
"done");
@@ -301,7 +301,7 @@ int main(int argc, char** argv) {
const char* poll_strategy = NULL;
grpc_test_init(argc, argv);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
poll_strategy = grpc_get_poll_strategy_name();
if (poll_strategy != NULL && strcmp(poll_strategy, "epollsig") == 0) {
diff --git a/test/core/iomgr/fd_conservation_posix_test.cc b/test/core/iomgr/fd_conservation_posix_test.cc
index 7f3420269e..11e664d8ff 100644
--- a/test/core/iomgr/fd_conservation_posix_test.cc
+++ b/test/core/iomgr/fd_conservation_posix_test.cc
@@ -31,7 +31,7 @@ int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* set max # of file descriptors to a low value, and
verify we can create and destroy many more than this number
@@ -45,7 +45,7 @@ int main(int argc, char** argv) {
p = grpc_iomgr_create_endpoint_pair("test", NULL);
grpc_endpoint_destroy(p.client);
grpc_endpoint_destroy(p.server);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
grpc_resource_quota_unref(resource_quota);
diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc
index d22cb5f4f6..160cfd4e99 100644
--- a/test/core/iomgr/fd_posix_test.cc
+++ b/test/core/iomgr/fd_posix_test.cc
@@ -246,7 +246,7 @@ static int server_start(server* sv) {
static void server_wait_and_shutdown(server* sv) {
gpr_mu_lock(g_mu);
while (!sv->done) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_worker* worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
@@ -362,7 +362,7 @@ static void client_wait_and_shutdown(client* cl) {
gpr_mu_lock(g_mu);
while (!cl->done) {
grpc_pollset_worker* worker = NULL;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(g_pollset, &worker, GRPC_MILLIS_INF_FUTURE)));
@@ -380,7 +380,7 @@ static void test_grpc_fd(void) {
server sv;
client cl;
int port;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
server_init(&sv);
port = server_start(&sv);
@@ -436,7 +436,7 @@ static void test_grpc_fd_change(void) {
ssize_t result;
grpc_closure first_closure;
grpc_closure second_closure;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CLOSURE_INIT(&first_closure, first_read_callback, &a,
grpc_schedule_on_exec_ctx);
@@ -513,7 +513,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
@@ -523,7 +523,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_free(g_pollset);
grpc_shutdown();
diff --git a/test/core/iomgr/pollset_set_test.cc b/test/core/iomgr/pollset_set_test.cc
index e9b46f59e3..bc9aafd5bd 100644
--- a/test/core/iomgr/pollset_set_test.cc
+++ b/test/core/iomgr/pollset_set_test.cc
@@ -84,7 +84,7 @@ static void cleanup_test_pollsets(test_pollset* pollsets,
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(pollsets[i].ps, &destroyed);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_free(pollsets[i].ps);
pollsets[i].ps = NULL;
}
@@ -129,7 +129,7 @@ static void cleanup_test_fds(test_fd* tfds, const int num_fds) {
for (int i = 0; i < num_fds; i++) {
grpc_fd_shutdown(tfds[i].fd,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("fd cleanup"));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* grpc_fd_orphan frees the memory allocated for grpc_fd. Normally it also
* calls close() on the underlying fd. In our case, we are using
@@ -138,7 +138,7 @@ static void cleanup_test_fds(test_fd* tfds, const int num_fds) {
* underlying fd, call it with a non-NULL 'release_fd' parameter */
grpc_fd_orphan(tfds[i].fd, NULL, &release_fd, false /* already_closed */,
"test_fd_cleanup");
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_wakeup_fd_destroy(&tfds[i].wakeup_fd);
}
@@ -199,7 +199,7 @@ static void pollset_set_test_basic() {
* |
* +---> FD9 (Added after PS2 is added to PSS0)
*/
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_worker* worker;
grpc_millis deadline;
@@ -236,7 +236,7 @@ static void pollset_set_test_basic() {
grpc_pollset_add_fd(pollsets[1].ps, tfds[8].fd);
grpc_pollset_add_fd(pollsets[2].ps, tfds[9].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Test that if any FD in the above structure is readable, it is observable by
* doing grpc_pollset_work on any pollset
@@ -259,10 +259,10 @@ static void pollset_set_test_basic() {
grpc_pollset_work(pollsets[i].ps, &worker, deadline));
gpr_mu_unlock(pollsets[i].mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
verify_readable_and_reset(tfds, num_fds);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
/* Test tear down */
@@ -270,14 +270,14 @@ static void pollset_set_test_basic() {
grpc_pollset_set_del_fd(pollset_sets[0].pss, tfds[5].fd);
grpc_pollset_set_del_fd(pollset_sets[1].pss, tfds[1].fd);
grpc_pollset_set_del_fd(pollset_sets[1].pss, tfds[6].fd);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_pollset_set_del_pollset(pollset_sets[1].pss, pollsets[0].ps);
grpc_pollset_set_del_pollset(pollset_sets[0].pss, pollsets[1].ps);
grpc_pollset_set_del_pollset(pollset_sets[0].pss, pollsets[2].ps);
grpc_pollset_set_del_pollset_set(pollset_sets[0].pss, pollset_sets[1].pss);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
cleanup_test_fds(tfds, num_fds);
cleanup_test_pollsets(pollsets, num_ps);
@@ -301,7 +301,7 @@ void pollset_set_test_dup_fds() {
* | +--> FD2
* +---> FD1
*/
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_worker* worker;
grpc_millis deadline;
@@ -337,10 +337,10 @@ void pollset_set_test_dup_fds() {
GPR_ASSERT(GRPC_ERROR_NONE ==
grpc_pollset_work(pollset.ps, &worker, deadline));
gpr_mu_unlock(pollset.mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
verify_readable_and_reset(tfds, num_fds);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Tear down */
grpc_pollset_set_del_fd(pollset_sets[0].pss, tfds[0].fd);
@@ -349,7 +349,7 @@ void pollset_set_test_dup_fds() {
grpc_pollset_set_del_pollset(pollset_sets[1].pss, pollset.ps);
grpc_pollset_set_del_pollset_set(pollset_sets[0].pss, pollset_sets[1].pss);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
cleanup_test_fds(tfds, num_fds);
cleanup_test_pollsets(&pollset, num_ps);
@@ -371,7 +371,7 @@ void pollset_set_test_empty_pollset() {
* |
* +---> FD2
*/
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_worker* worker;
grpc_millis deadline;
@@ -404,16 +404,16 @@ void pollset_set_test_empty_pollset() {
GPR_ASSERT(GRPC_ERROR_NONE ==
grpc_pollset_work(pollsets[0].ps, &worker, deadline));
gpr_mu_unlock(pollsets[0].mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
verify_readable_and_reset(tfds, num_fds);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Tear down */
grpc_pollset_set_del_fd(pollset_set.pss, tfds[0].fd);
grpc_pollset_set_del_pollset(pollset_set.pss, pollsets[0].ps);
grpc_pollset_set_del_pollset(pollset_set.pss, pollsets[1].ps);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
cleanup_test_fds(tfds, num_fds);
cleanup_test_pollsets(pollsets, num_ps);
@@ -421,7 +421,7 @@ void pollset_set_test_empty_pollset() {
}
int main(int argc, char** argv) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
const char* poll_strategy = grpc_get_poll_strategy_name();
diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc
index 9870d7aa73..4da5cd7a1f 100644
--- a/test/core/iomgr/resolve_address_posix_test.cc
+++ b/test/core/iomgr/resolve_address_posix_test.cc
@@ -67,7 +67,7 @@ void args_finish(args_struct* args) {
grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(args->pollset, &do_nothing_cb);
// exec_ctx needs to be flushed before calling grpc_pollset_destroy()
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_pollset_destroy(args->pollset);
gpr_free(args->pollset);
}
@@ -79,14 +79,14 @@ static grpc_millis n_sec_deadline(int seconds) {
static void actually_poll(void* argsp) {
args_struct* args = static_cast<args_struct*>(argsp);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_millis deadline = n_sec_deadline(10);
while (true) {
bool done = gpr_atm_acq_load(&args->done_atm) != 0;
if (done) {
break;
}
- grpc_millis time_left = deadline - ExecCtx::Get()->Now();
+ grpc_millis time_left = deadline - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIdPTR, done, time_left);
GPR_ASSERT(time_left >= 0);
grpc_pollset_worker* worker = NULL;
@@ -94,7 +94,7 @@ static void actually_poll(void* argsp) {
GRPC_LOG_IF_ERROR("pollset_work", grpc_pollset_work(args->pollset, &worker,
n_sec_deadline(1)));
gpr_mu_unlock(args->mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
gpr_event_set(&args->ev, (void*)1);
}
@@ -120,7 +120,7 @@ static void must_fail(void* argsp, grpc_error* err) {
}
static void test_unix_socket(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
poll_pollset_until_request_done(&args);
@@ -132,7 +132,7 @@ static void test_unix_socket(void) {
}
static void test_unix_socket_path_name_too_long(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
const char prefix[] = "unix:/path/name";
@@ -156,7 +156,7 @@ static void test_unix_socket_path_name_too_long(void) {
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
test_unix_socket();
test_unix_socket_path_name_too_long();
grpc_executor_shutdown();
diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc
index dbc825884d..035d99cf5e 100644
--- a/test/core/iomgr/resolve_address_test.cc
+++ b/test/core/iomgr/resolve_address_test.cc
@@ -63,7 +63,7 @@ void args_finish(args_struct* args) {
grpc_pollset_shutdown(args->pollset, &do_nothing_cb);
gpr_mu_unlock(args->mu);
// exec_ctx needs to be flushed before calling grpc_pollset_destroy()
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_pollset_destroy(args->pollset);
gpr_free(args->pollset);
}
@@ -74,14 +74,14 @@ static grpc_millis n_sec_deadline(int seconds) {
}
static void poll_pollset_until_request_done(args_struct* args) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_millis deadline = n_sec_deadline(10);
while (true) {
bool done = gpr_atm_acq_load(&args->done_atm) != 0;
if (done) {
break;
}
- grpc_millis time_left = deadline - ExecCtx::Get()->Now();
+ grpc_millis time_left = deadline - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIdPTR, done, time_left);
GPR_ASSERT(time_left >= 0);
grpc_pollset_worker* worker = NULL;
@@ -89,7 +89,7 @@ static void poll_pollset_until_request_done(args_struct* args) {
GRPC_LOG_IF_ERROR("pollset_work", grpc_pollset_work(args->pollset, &worker,
n_sec_deadline(1)));
gpr_mu_unlock(args->mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
}
gpr_event_set(&args->ev, (void*)1);
}
@@ -115,66 +115,66 @@ static void must_fail(void* argsp, grpc_error* err) {
}
static void test_localhost(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
"localhost:1", NULL, args.pollset_set,
GRPC_CLOSURE_CREATE(must_succeed, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
static void test_default_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
"localhost", "1", args.pollset_set,
GRPC_CLOSURE_CREATE(must_succeed, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
static void test_non_numeric_default_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
"localhost", "https", args.pollset_set,
GRPC_CLOSURE_CREATE(must_succeed, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
static void test_missing_default_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
"localhost", NULL, args.pollset_set,
GRPC_CLOSURE_CREATE(must_fail, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
static void test_ipv6_with_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
"[2001:db8::1]:1", NULL, args.pollset_set,
GRPC_CLOSURE_CREATE(must_succeed, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
@@ -187,14 +187,14 @@ static void test_ipv6_without_port(void) {
};
unsigned i;
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
kCases[i], "80", args.pollset_set,
GRPC_CLOSURE_CREATE(must_succeed, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
@@ -207,14 +207,14 @@ static void test_invalid_ip_addresses(void) {
};
unsigned i;
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
kCases[i], NULL, args.pollset_set,
GRPC_CLOSURE_CREATE(must_fail, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
@@ -226,14 +226,14 @@ static void test_unparseable_hostports(void) {
};
unsigned i;
for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
args_struct args;
args_init(&args);
grpc_resolve_address(
kCases[i], "1", args.pollset_set,
GRPC_CLOSURE_CREATE(must_fail, &args, grpc_schedule_on_exec_ctx),
&args.addrs);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
poll_pollset_until_request_done(&args);
args_finish(&args);
}
@@ -242,7 +242,7 @@ static void test_unparseable_hostports(void) {
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
test_localhost();
test_default_port();
test_non_numeric_default_port();
diff --git a/test/core/iomgr/resource_quota_test.cc b/test/core/iomgr/resource_quota_test.cc
index 40beadc5d6..c4f6886836 100644
--- a/test/core/iomgr/resource_quota_test.cc
+++ b/test/core/iomgr/resource_quota_test.cc
@@ -84,7 +84,7 @@ grpc_closure* make_unused_reclaimer(grpc_closure* then) {
}
static void destroy_user(grpc_resource_user* usr) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_unref(usr);
}
@@ -117,11 +117,11 @@ static void test_instant_alloc_then_free(void) {
grpc_resource_quota_resize(q, 1024 * 1024);
grpc_resource_user* usr = grpc_resource_user_create(q, "usr");
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -135,7 +135,7 @@ static void test_instant_alloc_free_pair(void) {
grpc_resource_quota_resize(q, 1024 * 1024);
grpc_resource_user* usr = grpc_resource_user_create(q, "usr");
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, NULL);
grpc_resource_user_free(usr, 1024);
}
@@ -152,14 +152,14 @@ static void test_simple_async_alloc(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -175,7 +175,7 @@ static void test_async_alloc_blocked_by_size(void) {
gpr_event ev;
gpr_event_init(&ev);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(
@@ -185,7 +185,7 @@ static void test_async_alloc_blocked_by_size(void) {
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != NULL);
;
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -201,7 +201,7 @@ static void test_scavenge(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr1, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -209,13 +209,13 @@ static void test_scavenge(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr1, 1024);
}
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr2, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -223,7 +223,7 @@ static void test_scavenge(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr2, 1024);
}
grpc_resource_quota_unref(q);
@@ -240,7 +240,7 @@ static void test_scavenge_blocked(void) {
gpr_event ev;
{
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr1, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -249,14 +249,14 @@ static void test_scavenge_blocked(void) {
}
{
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr2, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(
&ev, grpc_timeout_milliseconds_to_deadline(100)) == NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr1, 1024);
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -264,7 +264,7 @@ static void test_scavenge_blocked(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr2, 1024);
}
grpc_resource_quota_unref(q);
@@ -281,7 +281,7 @@ static void test_blocked_until_scheduled_reclaim(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -291,14 +291,14 @@ static void test_blocked_until_scheduled_reclaim(void) {
gpr_event reclaim_done;
gpr_event_init(&reclaim_done);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_reclaimer(usr, 1024, set_event(&reclaim_done)));
}
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&reclaim_done,
@@ -308,7 +308,7 @@ static void test_blocked_until_scheduled_reclaim(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -325,7 +325,7 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr1, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -335,14 +335,14 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
gpr_event reclaim_done;
gpr_event_init(&reclaim_done);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr1, false, make_reclaimer(usr1, 1024, set_event(&reclaim_done)));
}
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr2, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&reclaim_done,
@@ -352,7 +352,7 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr2, 1024);
}
grpc_resource_quota_unref(q);
@@ -369,7 +369,7 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -379,14 +379,14 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) {
gpr_event reclaim_done;
gpr_event_init(&reclaim_done);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, true, make_reclaimer(usr, 1024, set_event(&reclaim_done)));
}
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&reclaim_done,
@@ -396,7 +396,7 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -414,7 +414,7 @@ static void test_unused_reclaim_is_cancelled(void) {
gpr_event destructive_done;
gpr_event_init(&destructive_done);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_unused_reclaimer(set_event(&benign_done)));
grpc_resource_user_post_reclaimer(
@@ -448,7 +448,7 @@ static void test_benign_reclaim_is_preferred(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -456,7 +456,7 @@ static void test_benign_reclaim_is_preferred(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_reclaimer(usr, 1024, set_event(&benign_done)));
grpc_resource_user_post_reclaimer(
@@ -472,7 +472,7 @@ static void test_benign_reclaim_is_preferred(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&benign_done,
@@ -484,7 +484,7 @@ static void test_benign_reclaim_is_preferred(void) {
NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -508,7 +508,7 @@ static void test_multiple_reclaims_can_be_triggered(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
@@ -516,7 +516,7 @@ static void test_multiple_reclaims_can_be_triggered(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_reclaimer(usr, 512, set_event(&benign_done)));
grpc_resource_user_post_reclaimer(
@@ -532,7 +532,7 @@ static void test_multiple_reclaims_can_be_triggered(void) {
{
gpr_event ev;
gpr_event_init(&ev);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&ev));
GPR_ASSERT(gpr_event_wait(&benign_done,
@@ -544,7 +544,7 @@ static void test_multiple_reclaims_can_be_triggered(void) {
;
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
grpc_resource_quota_unref(q);
@@ -563,16 +563,16 @@ static void test_resource_user_stays_allocated_until_memory_released(void) {
grpc_resource_quota_resize(q, 1024 * 1024);
grpc_resource_user* usr = grpc_resource_user_create(q, "usr");
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_quota_unref(q);
grpc_resource_user_unref(usr);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
}
@@ -593,7 +593,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
gpr_event reclaimer_cancelled;
gpr_event_init(&reclaimer_cancelled);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_unused_reclaimer(set_event(&reclaimer_cancelled)));
@@ -604,7 +604,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
{
gpr_event allocated;
gpr_event_init(&allocated);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&allocated));
GPR_ASSERT(gpr_event_wait(&allocated,
@@ -614,7 +614,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_unref(usr);
GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled,
@@ -622,7 +622,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
NULL);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled,
@@ -641,7 +641,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
{
gpr_event allocated;
gpr_event_init(&allocated);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&allocated));
GPR_ASSERT(gpr_event_wait(&allocated,
@@ -651,7 +651,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
gpr_event reclaimer_done;
gpr_event_init(&reclaimer_done);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_post_reclaimer(
usr, false, make_reclaimer(usr, 1024, set_event(&reclaimer_done)));
@@ -662,7 +662,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
{
gpr_event allocated;
gpr_event_init(&allocated);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc(usr, 1024, set_event(&allocated));
GPR_ASSERT(gpr_event_wait(&allocated,
@@ -672,7 +672,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
}
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_free(usr, 1024);
}
destroy_user(usr);
@@ -696,14 +696,14 @@ static void test_one_slice(void) {
{
const int start_allocs = num_allocs;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer);
assert_counter_becomes(&num_allocs, start_allocs + 1);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_buffer_destroy_internal(&buffer);
}
destroy_user(usr);
@@ -728,20 +728,20 @@ static void test_one_slice_deleted_late(void) {
{
const int start_allocs = num_allocs;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer);
assert_counter_becomes(&num_allocs, start_allocs + 1);
}
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_unref(usr);
}
grpc_resource_quota_unref(q);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_buffer_destroy_internal(&buffer);
}
}
@@ -770,7 +770,7 @@ static void test_negative_rq_free_pool(void) {
{
const int start_allocs = num_allocs;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer);
assert_counter_becomes(&num_allocs, start_allocs + 1);
@@ -783,13 +783,13 @@ static void test_negative_rq_free_pool(void) {
GPR_ASSERT(grpc_resource_quota_get_memory_pressure(q) > 1 - eps);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_user_unref(usr);
}
grpc_resource_quota_unref(q);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_buffer_destroy_internal(&buffer);
}
}
diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc
index abefecba33..d736d08a45 100644
--- a/test/core/iomgr/tcp_client_posix_test.cc
+++ b/test/core/iomgr/tcp_client_posix_test.cc
@@ -53,7 +53,7 @@ static grpc_millis test_deadline(void) {
static void finish_connection() {
gpr_mu_lock(g_mu);
g_connections_complete++;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(
GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)));
@@ -83,7 +83,7 @@ void test_succeeds(void) {
int r;
int connections_complete_before;
grpc_closure done;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_succeeds");
@@ -127,7 +127,7 @@ void test_succeeds(void) {
grpc_timespec_to_millis_round_up(
grpc_timeout_seconds_to_deadline(5)))));
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
@@ -139,7 +139,7 @@ void test_fails(void) {
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
int connections_complete_before;
grpc_closure done;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_fails");
@@ -175,7 +175,7 @@ void test_fails(void) {
break;
}
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
@@ -188,7 +188,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset_set = grpc_pollset_set_create();
diff --git a/test/core/iomgr/tcp_client_uv_test.cc b/test/core/iomgr/tcp_client_uv_test.cc
index 0355896b85..344478ea97 100644
--- a/test/core/iomgr/tcp_client_uv_test.cc
+++ b/test/core/iomgr/tcp_client_uv_test.cc
@@ -87,7 +87,7 @@ void test_succeeds(void) {
uv_tcp_t* svr_handle = static_cast<uv_tcp_t*>(gpr_malloc(sizeof(uv_tcp_t)));
int connections_complete_before;
grpc_closure done;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_succeeds");
@@ -121,7 +121,7 @@ void test_succeeds(void) {
grpc_timespec_to_millis_round_up(
grpc_timeout_seconds_to_deadline(5)))));
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
@@ -136,7 +136,7 @@ void test_fails(void) {
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
int connections_complete_before;
grpc_closure done;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_fails");
@@ -173,7 +173,7 @@ void test_fails(void) {
break;
}
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
@@ -186,7 +186,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size()));
diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc
index 678e1c3638..c12e695fb6 100644
--- a/test/core/iomgr/tcp_posix_test.cc
+++ b/test/core/iomgr/tcp_posix_test.cc
@@ -162,7 +162,7 @@ static void read_test(size_t num_bytes, size_t slice_size) {
size_t written_bytes;
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO, "Read test of size %" PRIuPTR ", slice size %" PRIuPTR,
num_bytes, slice_size);
@@ -212,7 +212,7 @@ static void large_read_test(size_t slice_size) {
ssize_t written_bytes;
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO, "Start large read test, slice size %" PRIuPTR, slice_size);
@@ -300,7 +300,7 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) {
int flags;
int current = 0;
int i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
flags = fcntl(fd, F_GETFL, 0);
GPR_ASSERT(fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) == 0);
@@ -347,7 +347,7 @@ static void write_test(size_t num_bytes, size_t slice_size) {
grpc_closure write_done_closure;
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO,
"Start write test with %" PRIuPTR " bytes, slice size %" PRIuPTR,
@@ -410,7 +410,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
int fd;
grpc_millis deadline =
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_closure fd_released_cb;
int fd_released_done = 0;
GRPC_CLOSURE_INIT(&fd_released_cb, &on_fd_released, &fd_released_done,
@@ -450,7 +450,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
gpr_log(GPR_DEBUG, "wakeup: read=%" PRIdPTR " target=%" PRIdPTR,
state.read_bytes, state.target_read_bytes);
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
GPR_ASSERT(state.read_bytes == state.target_read_bytes);
@@ -458,7 +458,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
grpc_slice_buffer_destroy_internal(&state.incoming);
grpc_tcp_destroy_and_release_fd(ep, &fd, &fd_released_cb);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
while (!fd_released_done) {
grpc_pollset_worker* worker = NULL;
@@ -506,7 +506,7 @@ static grpc_endpoint_test_fixture create_fixture_tcp_socketpair(
size_t slice_size) {
int sv[2];
grpc_endpoint_test_fixture f;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
create_sockets(sv);
grpc_resource_quota* resource_quota =
@@ -537,7 +537,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size());
diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc
index 1c3f4490d5..7b3219320e 100644
--- a/test/core/iomgr/tcp_server_posix_test.cc
+++ b/test/core/iomgr/tcp_server_posix_test.cc
@@ -163,14 +163,14 @@ static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset,
}
static void test_no_op(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_tcp_server* s;
GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s));
grpc_tcp_server_unref(s);
}
static void test_no_op_with_start(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_tcp_server* s;
GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s));
LOG_TEST("test_no_op_with_start");
@@ -179,7 +179,7 @@ static void test_no_op_with_start(void) {
}
static void test_no_op_with_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_tcp_server* s;
@@ -198,7 +198,7 @@ static void test_no_op_with_port(void) {
}
static void test_no_op_with_port_and_start(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_tcp_server* s;
@@ -243,7 +243,8 @@ static grpc_error* tcp_connect(const test_addr* remote,
return GRPC_OS_ERROR(errno, "connect");
}
gpr_log(GPR_DEBUG, "wait");
- while (g_nconnects == nconnects_before && deadline > ExecCtx::Get()->Now()) {
+ while (g_nconnects == nconnects_before &&
+ deadline > grpc_core::ExecCtx::Get()->Now()) {
grpc_pollset_worker* worker = NULL;
grpc_error* err;
if ((err = grpc_pollset_work(g_pollset, &worker, deadline)) !=
@@ -281,7 +282,7 @@ static grpc_error* tcp_connect(const test_addr* remote,
static void test_connect(size_t num_connects,
const grpc_channel_args* channel_args,
test_addrs* dst_addrs, bool test_dst_addrs) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
grpc_resolved_address resolved_addr1;
struct sockaddr_storage* const addr =
@@ -420,7 +421,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_arg chan_args[1];
chan_args[0].type = GRPC_ARG_INTEGER;
chan_args[0].key = const_cast<char*>(GRPC_ARG_EXPAND_WILDCARD_ADDRS);
diff --git a/test/core/iomgr/tcp_server_uv_test.cc b/test/core/iomgr/tcp_server_uv_test.cc
index 50042af37f..07b1fb1579 100644
--- a/test/core/iomgr/tcp_server_uv_test.cc
+++ b/test/core/iomgr/tcp_server_uv_test.cc
@@ -115,14 +115,14 @@ static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset,
}
static void test_no_op(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_tcp_server* s;
GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s));
grpc_tcp_server_unref(s);
}
static void test_no_op_with_start(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_tcp_server* s;
GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s));
LOG_TEST("test_no_op_with_start");
@@ -131,7 +131,7 @@ static void test_no_op_with_start(void) {
}
static void test_no_op_with_port(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_tcp_server* s;
@@ -150,7 +150,7 @@ static void test_no_op_with_port(void) {
}
static void test_no_op_with_port_and_start(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_tcp_server* s;
@@ -214,7 +214,7 @@ static void tcp_connect(const struct sockaddr* remote, socklen_t remote_len,
/* Tests a tcp server with multiple ports. */
static void test_connect(unsigned n) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
grpc_resolved_address resolved_addr1;
struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr;
@@ -284,7 +284,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size()));
diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc
index 7281f55b85..537733150f 100644
--- a/test/core/iomgr/timer_list_test.cc
+++ b/test/core/iomgr/timer_list_test.cc
@@ -43,7 +43,7 @@ static void cb(void* arg, grpc_error* error) {
static void add_test(void) {
int i;
grpc_timer timers[20];
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO, "add_test");
@@ -52,7 +52,7 @@ static void add_test(void) {
grpc_timer_check_trace.value = 1;
memset(cb_called, 0, sizeof(cb_called));
- grpc_millis start = ExecCtx::Get()->Now();
+ grpc_millis start = grpc_core::ExecCtx::Get()->Now();
/* 10 ms timers. will expire in the current epoch */
for (i = 0; i < 10; i++) {
@@ -69,7 +69,7 @@ static void add_test(void) {
}
/* collect timers. Only the first batch should be ready. */
- ExecCtx::Get()->SetNow(start + 500);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 500);
GPR_ASSERT(grpc_timer_check(NULL) == GRPC_TIMERS_FIRED);
for (i = 0; i < 20; i++) {
@@ -77,7 +77,7 @@ static void add_test(void) {
GPR_ASSERT(cb_called[i][0] == 0);
}
- ExecCtx::Get()->SetNow(start + 600);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 600);
GPR_ASSERT(grpc_timer_check(NULL) == GRPC_TIMERS_CHECKED_AND_EMPTY);
for (i = 0; i < 30; i++) {
@@ -86,7 +86,7 @@ static void add_test(void) {
}
/* collect the rest of the timers */
- ExecCtx::Get()->SetNow(start + 1500);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 1500);
GPR_ASSERT(grpc_timer_check(NULL) == GRPC_TIMERS_FIRED);
for (i = 0; i < 30; i++) {
@@ -94,7 +94,7 @@ static void add_test(void) {
GPR_ASSERT(cb_called[i][0] == 0);
}
- ExecCtx::Get()->SetNow(start + 1600);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(start + 1600);
GPR_ASSERT(grpc_timer_check(NULL) == GRPC_TIMERS_CHECKED_AND_EMPTY);
for (i = 0; i < 30; i++) {
GPR_ASSERT(cb_called[i][1] == (i < 20));
@@ -107,11 +107,11 @@ static void add_test(void) {
/* Cleaning up a list with pending timers. */
void destruction_test(void) {
grpc_timer timers[5];
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO, "destruction_test");
- ExecCtx::Get()->SetNow(0);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(0);
grpc_timer_list_init();
grpc_timer_trace.value = 1;
grpc_timer_check_trace.value = 1;
@@ -132,7 +132,7 @@ void destruction_test(void) {
grpc_timer_init(
&timers[4], 1,
GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)4, grpc_schedule_on_exec_ctx));
- ExecCtx::Get()->SetNow(2);
+ grpc_core::ExecCtx::Get()->TestOnlySetNow(2);
GPR_ASSERT(grpc_timer_check(NULL) == GRPC_TIMERS_FIRED);
GPR_ASSERT(1 == cb_called[4][1]);
diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc
index 47e5cf0254..0afd836744 100644
--- a/test/core/iomgr/udp_server_test.cc
+++ b/test/core/iomgr/udp_server_test.cc
@@ -127,13 +127,13 @@ static test_socket_factory* test_socket_factory_create(void) {
}
static void test_no_op(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_udp_server* s = grpc_udp_server_create(NULL);
grpc_udp_server_destroy(s, NULL);
}
static void test_no_op_with_start(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_udp_server* s = grpc_udp_server_create(NULL);
LOG_TEST("test_no_op_with_start");
grpc_udp_server_start(s, NULL, 0, NULL);
@@ -142,7 +142,7 @@ static void test_no_op_with_start(void) {
static void test_no_op_with_port(void) {
g_number_of_orphan_calls = 0;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_udp_server* s = grpc_udp_server_create(NULL);
@@ -162,7 +162,7 @@ static void test_no_op_with_port(void) {
static void test_no_op_with_port_and_socket_factory(void) {
g_number_of_orphan_calls = 0;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
@@ -194,7 +194,7 @@ static void test_no_op_with_port_and_socket_factory(void) {
static void test_no_op_with_port_and_start(void) {
g_number_of_orphan_calls = 0;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
grpc_udp_server* s = grpc_udp_server_create(NULL);
@@ -216,7 +216,7 @@ static void test_no_op_with_port_and_start(void) {
}
static void test_receive(int number_of_clients) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr;
int clifd, svrfd;
@@ -260,12 +260,12 @@ static void test_receive(int number_of_clients) {
(socklen_t)resolved_addr.len) == 0);
GPR_ASSERT(5 == write(clifd, "hello", 5));
while (g_number_of_reads == number_of_reads_before &&
- deadline > ExecCtx::Get()->Now()) {
+ deadline > grpc_core::ExecCtx::Get()->Now()) {
grpc_pollset_worker* worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", grpc_pollset_work(g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(g_mu);
}
GPR_ASSERT(g_number_of_reads == number_of_reads_before + 1);
@@ -291,7 +291,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc
index 029171c931..639f4e5056 100644
--- a/test/core/security/credentials_test.cc
+++ b/test/core/security/credentials_test.cc
@@ -148,7 +148,7 @@ static grpc_httpcli_response http_response(int status, const char* body) {
/* -- Tests. -- */
static void test_empty_md_array(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_credentials_mdelem_array md_array;
memset(&md_array, 0, sizeof(md_array));
GPR_ASSERT(md_array.md == NULL);
@@ -157,7 +157,7 @@ static void test_empty_md_array(void) {
}
static void test_add_to_empty_md_array(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_credentials_mdelem_array md_array;
memset(&md_array, 0, sizeof(md_array));
const char* key = "hello";
@@ -172,7 +172,7 @@ static void test_add_to_empty_md_array(void) {
}
static void test_add_abunch_to_md_array(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_credentials_mdelem_array md_array;
memset(&md_array, 0, sizeof(md_array));
const char* key = "hello";
@@ -191,7 +191,7 @@ static void test_add_abunch_to_md_array(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response =
@@ -208,7 +208,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response =
@@ -220,7 +220,7 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response = http_response(200, "");
@@ -231,7 +231,7 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response =
@@ -246,7 +246,7 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response = http_response(200,
@@ -260,7 +260,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
}
static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response =
@@ -276,7 +276,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) {
static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime(
void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_httpcli_response response =
@@ -378,7 +378,7 @@ static void run_request_metadata_test(grpc_call_credentials* creds,
}
static void test_google_iam_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY,
test_google_iam_authorization_token},
{GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY,
@@ -395,7 +395,7 @@ static void test_google_iam_creds(void) {
}
static void test_access_token_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {{GRPC_AUTHORIZATION_METADATA_KEY, "Bearer blah"}};
request_metadata_state* state =
make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd));
@@ -419,7 +419,7 @@ static grpc_security_status check_channel_oauth2_create_security_connector(
}
static void test_channel_oauth2_composite_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args* new_args;
grpc_channel_credentials_vtable vtable = {
NULL, check_channel_oauth2_create_security_connector, NULL};
@@ -439,7 +439,7 @@ static void test_channel_oauth2_composite_creds(void) {
}
static void test_oauth2_google_iam_composite_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {
{GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token},
{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY,
@@ -492,7 +492,7 @@ check_channel_oauth2_google_iam_create_security_connector(
}
static void test_channel_oauth2_google_iam_composite_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args* new_args;
grpc_channel_credentials_vtable vtable = {
NULL, check_channel_oauth2_google_iam_create_security_connector, NULL};
@@ -569,7 +569,7 @@ static int httpcli_get_should_not_be_called(const grpc_httpcli_request* request,
}
static void test_compute_engine_creds_success(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
grpc_call_credentials* creds =
@@ -583,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -591,14 +591,14 @@ 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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
}
static void test_compute_engine_creds_failure(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
request_metadata_state* state = make_request_metadata_state(
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Error occured when fetching oauth2 token."),
@@ -658,7 +658,7 @@ static int refresh_token_httpcli_post_failure(
}
static void test_refresh_token_creds_success(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL,
@@ -672,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -680,14 +680,14 @@ 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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
grpc_httpcli_set_override(NULL, NULL);
}
static void test_refresh_token_creds_failure(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
request_metadata_state* state = make_request_metadata_state(
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Error occured when fetching oauth2 token."),
@@ -790,7 +790,7 @@ static void test_jwt_creds_lifetime(void) {
static void test_jwt_creds_success(void) {
char* json_key_string = test_json_key_str();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL,
NULL};
char* expected_md_value;
@@ -805,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Second request: the cached token should be served directly. */
state =
@@ -813,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Third request: Different service url so jwt_encode_and_sign should be
called again (no caching). */
@@ -822,7 +822,7 @@ 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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
grpc_call_credentials_unref(creds);
gpr_free(json_key_string);
@@ -832,7 +832,7 @@ static void test_jwt_creds_success(void) {
static void test_jwt_creds_signing_failure(void) {
char* json_key_string = test_json_key_str();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL,
NULL};
request_metadata_state* state = make_request_metadata_state(
@@ -863,7 +863,7 @@ static void set_google_default_creds_env_var_with_file_contents(
}
static void test_google_default_creds_auth_key(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_service_account_jwt_access_credentials* jwt;
grpc_composite_channel_credentials* creds;
char* json_key = test_json_key_str();
@@ -884,7 +884,7 @@ static void test_google_default_creds_auth_key(void) {
}
static void test_google_default_creds_refresh_token(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_google_refresh_token_credentials* refresh;
grpc_composite_channel_credentials* creds;
grpc_flush_cached_google_default_credentials();
@@ -919,7 +919,7 @@ static int default_creds_gce_detection_httpcli_get_success_override(
static char* null_well_known_creds_path_getter(void) { return NULL; }
static void test_google_default_creds_gce(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
expected_md emd[] = {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
request_metadata_state* state =
@@ -945,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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
/* Check that we get a cached creds if we call
grpc_google_default_credentials_create again.
@@ -1054,7 +1054,7 @@ static void plugin_destroy(void* state) {
static void test_metadata_plugin_success(void) {
plugin_state state = PLUGIN_INITIAL_STATE;
grpc_metadata_credentials_plugin plugin;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL,
NULL};
request_metadata_state* md_state = make_request_metadata_state(
@@ -1077,7 +1077,7 @@ static void test_metadata_plugin_success(void) {
static void test_metadata_plugin_failure(void) {
plugin_state state = PLUGIN_INITIAL_STATE;
grpc_metadata_credentials_plugin plugin;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL,
NULL};
char* expected_error;
@@ -1119,7 +1119,7 @@ static void test_get_well_known_google_credentials_file_path(void) {
}
static void test_channel_creds_duplicate_without_call_creds(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_credentials* channel_creds =
grpc_fake_transport_security_credentials_create();
diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc
index 9eac2b9254..a139f3776f 100644
--- a/test/core/security/json_token_test.cc
+++ b/test/core/security/json_token_test.cc
@@ -206,7 +206,7 @@ static void test_parse_json_key_failure_no_private_key(void) {
static grpc_json* parse_json_part_from_jwt(const char* str, size_t len,
char** scratchpad) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
char* b64;
char* decoded;
grpc_json* json;
@@ -326,7 +326,7 @@ static void check_jwt_claim(grpc_json* claim, const char* expected_audience,
static void check_jwt_signature(const char* b64_signature, RSA* rsa_key,
const char* signed_data,
size_t signed_data_size) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
EVP_MD_CTX* md_ctx = EVP_MD_CTX_create();
EVP_PKEY* key = EVP_PKEY_new();
diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc
index 7485aa10b4..55e28e6eb2 100644
--- a/test/core/security/jwt_verifier_test.cc
+++ b/test/core/security/jwt_verifier_test.cc
@@ -209,7 +209,7 @@ static void test_claims_success(void) {
grpc_json* json = grpc_json_parse_string_with_len(
(char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s));
GPR_ASSERT(json != NULL);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
claims = grpc_jwt_claims_from_json(json, s);
GPR_ASSERT(claims != NULL);
GPR_ASSERT(grpc_jwt_claims_json(claims) == json);
@@ -231,7 +231,7 @@ static void test_expired_claims_failure(void) {
gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME};
gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME};
GPR_ASSERT(json != NULL);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
claims = grpc_jwt_claims_from_json(json, s);
GPR_ASSERT(claims != NULL);
GPR_ASSERT(grpc_jwt_claims_json(claims) == json);
@@ -252,7 +252,7 @@ static void test_invalid_claims_failure(void) {
grpc_slice s = grpc_slice_from_copied_string(invalid_claims);
grpc_json* json = grpc_json_parse_string_with_len(
(char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL);
}
@@ -262,7 +262,7 @@ static void test_bad_audience_claims_failure(void) {
grpc_json* json = grpc_json_parse_string_with_len(
(char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s));
GPR_ASSERT(json != NULL);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
claims = grpc_jwt_claims_from_json(json, s);
GPR_ASSERT(claims != NULL);
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://bar.com") ==
@@ -276,7 +276,7 @@ static void test_bad_subject_claims_failure(void) {
grpc_json* json = grpc_json_parse_string_with_len(
(char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s));
GPR_ASSERT(json != NULL);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
claims = grpc_jwt_claims_from_json(json, s);
GPR_ASSERT(claims != NULL);
GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") ==
@@ -350,7 +350,7 @@ static void on_verification_success(void* user_data,
}
static void test_jwt_verifier_google_email_issuer_success(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer);
@@ -383,7 +383,7 @@ static int httpcli_get_custom_keys_for_email(
}
static void test_jwt_verifier_custom_email_issuer_success(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(&custom_mapping, 1);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_custom_email_issuer);
@@ -430,7 +430,7 @@ static int httpcli_get_openid_config(const grpc_httpcli_request* request,
}
static void test_jwt_verifier_url_issuer_success(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_url_issuer);
@@ -469,7 +469,7 @@ static int httpcli_get_bad_json(const grpc_httpcli_request* request,
}
static void test_jwt_verifier_url_issuer_bad_config(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_url_issuer);
@@ -492,7 +492,7 @@ static void test_jwt_verifier_url_issuer_bad_config(void) {
}
static void test_jwt_verifier_bad_json_key(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer);
@@ -521,7 +521,7 @@ static void corrupt_jwt_sig(char* jwt) {
char* last_dot = strrchr(jwt, '.');
GPR_ASSERT(last_dot != NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
sig = grpc_base64_decode(last_dot + 1, 1);
}
GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig));
@@ -543,7 +543,7 @@ static void on_verification_bad_signature(void* user_data,
}
static void test_jwt_verifier_bad_signature(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
char* jwt = NULL;
char* key_str = json_key_str(json_key_str_part3_for_url_issuer);
@@ -583,7 +583,7 @@ static void on_verification_bad_format(void* user_data,
}
static void test_jwt_verifier_bad_format(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0);
grpc_httpcli_set_override(httpcli_get_should_not_be_called,
httpcli_post_should_not_be_called);
diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc
index f4a52aaba0..e24ccbc107 100644
--- a/test/core/security/oauth2_utils.cc
+++ b/test/core/security/oauth2_utils.cc
@@ -69,7 +69,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials(
grpc_call_credentials* creds) {
oauth2_request request;
memset(&request, 0, sizeof(request));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_closure do_nothing_closure;
grpc_auth_metadata_context null_ctx = {"", "", NULL, NULL};
@@ -92,7 +92,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials(
on_oauth2_response(&request, error);
GRPC_ERROR_UNREF(error);
}
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(request.mu);
while (!request.is_done) {
diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc
index 6153e8a9cb..29201afe40 100644
--- a/test/core/security/print_google_default_creds_token.cc
+++ b/test/core/security/print_google_default_creds_token.cc
@@ -62,7 +62,7 @@ static void on_metadata_response(void* arg, grpc_error* error) {
int main(int argc, char** argv) {
int result = 0;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
synchronizer sync;
grpc_channel_credentials* creds = NULL;
const char* service_url = "https://test.foo.google.com/Foo";
@@ -111,7 +111,7 @@ int main(int argc, char** argv) {
GRPC_MILLIS_INF_FUTURE)))
sync.is_done = true;
gpr_mu_unlock(sync.mu);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(sync.mu);
}
gpr_mu_unlock(sync.mu);
diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc
index a49bf1a0b4..7cee0dd3fe 100644
--- a/test/core/security/secure_endpoint_test.cc
+++ b/test/core/security/secure_endpoint_test.cc
@@ -38,7 +38,7 @@ static grpc_pollset* g_pollset;
static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair(
size_t slice_size, grpc_slice* leftover_slices, size_t leftover_nslices,
bool use_zero_copy_protector) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
tsi_frame_protector* fake_read_protector =
tsi_create_fake_frame_protector(NULL);
tsi_frame_protector* fake_write_protector =
@@ -170,7 +170,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) {
grpc_slice_buffer incoming;
grpc_slice s =
grpc_slice_from_copied_string("hello world 12345678900987654321");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
int n = 0;
grpc_closure done_closure;
gpr_log(GPR_INFO, "Start test left over");
@@ -202,7 +202,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_test_init(argc, argv);
grpc_init();
diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc
index 84a42546c6..b9198279e3 100644
--- a/test/core/security/ssl_server_fuzzer.cc
+++ b/test/core/security/ssl_server_fuzzer.cc
@@ -55,7 +55,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
if (leak_check) grpc_memory_counters_init();
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("ssl_server_fuzzer");
@@ -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 + ExecCtx::Get()->Now();
+ grpc_millis deadline = GPR_MS_PER_SEC + grpc_core::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);
- ExecCtx::Get()->Flush();
+ grpc_core::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"));
- ExecCtx::Get()->Flush();
+ grpc_core::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);
- ExecCtx::Get()->Flush();
+ grpc_core::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 f3e8966625..c4c3541d19 100644
--- a/test/core/security/verify_jwt.cc
+++ b/test/core/security/verify_jwt.cc
@@ -76,7 +76,7 @@ int main(int argc, char** argv) {
gpr_cmdline* cl;
const char* jwt = NULL;
const char* aud = NULL;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_init();
cl = gpr_cmdline_create("JWT verifier tool");
@@ -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);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(sync.mu);
}
gpr_mu_unlock(sync.mu);
diff --git a/test/core/slice/b64_test.cc b/test/core/slice/b64_test.cc
index 5ed9910740..08a5770b2a 100644
--- a/test/core/slice/b64_test.cc
+++ b/test/core/slice/b64_test.cc
@@ -44,7 +44,7 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) {
const char* hello = "hello";
char* hello_b64 =
grpc_base64_encode(hello, strlen(hello), url_safe, multiline);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe);
GPR_ASSERT(GRPC_SLICE_LENGTH(hello_slice) == strlen(hello));
GPR_ASSERT(strncmp((const char*)GRPC_SLICE_START_PTR(hello_slice), hello,
@@ -64,7 +64,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) {
/* Try all the different paddings. */
for (i = 0; i < 3; i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
b64 = grpc_base64_encode(orig, sizeof(orig) - i, url_safe, multiline);
orig_decoded = grpc_base64_decode(b64, url_safe);
GPR_ASSERT(GRPC_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i));
@@ -115,7 +115,7 @@ static void test_url_safe_unsafe_mismatch_failure(void) {
int url_safe = 1;
for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
b64 = grpc_base64_encode(orig, sizeof(orig), url_safe, 0);
orig_decoded = grpc_base64_decode(b64, !url_safe);
GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded));
@@ -164,7 +164,7 @@ static void test_rfc4648_test_vectors(void) {
static void test_unpadded_decode(void) {
grpc_slice decoded;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
decoded = grpc_base64_decode("Zm9vYmFy", 0);
GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded));
GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0);
diff --git a/test/core/slice/slice_hash_table_test.cc b/test/core/slice/slice_hash_table_test.cc
index 89fc33a7bf..ea00688af0 100644
--- a/test/core/slice/slice_hash_table_test.cc
+++ b/test/core/slice/slice_hash_table_test.cc
@@ -119,7 +119,7 @@ static void test_slice_hash_table() {
check_values(test_entries, num_entries, table);
check_non_existent_value("XX", table);
// Clean up.
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_hash_table_unref(table);
}
@@ -146,7 +146,7 @@ static void test_slice_hash_table_eq() {
create_table_from_entries(test_entries_b, num_entries_b, value_cmp_fn);
GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_b) == 0);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_hash_table_unref(table_a);
grpc_slice_hash_table_unref(table_b);
}
@@ -217,7 +217,7 @@ static void test_slice_hash_table_not_eq() {
create_table_from_entries(test_entries_h, num_entries_h, pointer_cmp_fn);
GPR_ASSERT(grpc_slice_hash_table_cmp(table_g, table_h) != 0);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_hash_table_unref(table_a);
grpc_slice_hash_table_unref(table_b_larger);
grpc_slice_hash_table_unref(table_b_smaller);
diff --git a/test/core/surface/byte_buffer_reader_test.cc b/test/core/surface/byte_buffer_reader_test.cc
index 1f3a83efe6..f9ce98da21 100644
--- a/test/core/surface/byte_buffer_reader_test.cc
+++ b/test/core/surface/byte_buffer_reader_test.cc
@@ -132,7 +132,7 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm,
memset(GRPC_SLICE_START_PTR(input_slice), 'a', input_size);
grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out));
}
diff --git a/test/core/surface/channel_create_test.cc b/test/core/surface/channel_create_test.cc
index ece06e4968..3e7dd311db 100644
--- a/test/core/surface/channel_create_test.cc
+++ b/test/core/surface/channel_create_test.cc
@@ -35,7 +35,7 @@ void test_unknown_scheme_target(void) {
chan = grpc_insecure_channel_create("blah://blah", NULL, NULL);
GPR_ASSERT(chan != NULL);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc
index 39aedeba02..e38b087a4b 100644
--- a/test/core/surface/completion_queue_test.cc
+++ b/test/core/surface/completion_queue_test.cc
@@ -136,7 +136,7 @@ static void test_cq_end_op(void) {
attr.version = 1;
attr.cq_completion_type = GRPC_CQ_NEXT;
for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
attr.cq_polling_type = polling_types[i];
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, NULL);
@@ -170,7 +170,7 @@ static void test_cq_tls_cache_full(void) {
attr.version = 1;
attr.cq_completion_type = GRPC_CQ_NEXT;
for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) {
- ExecCtx _local_exec_ctx; // Reset exec_ctx
+ grpc_core::ExecCtx _local_exec_ctx; // Reset exec_ctx
attr.cq_polling_type = polling_types[i];
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, NULL);
@@ -208,7 +208,7 @@ static void test_cq_tls_cache_empty(void) {
attr.version = 1;
attr.cq_completion_type = GRPC_CQ_NEXT;
for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) {
- ExecCtx _local_exec_ctx; // Reset exec_ctx
+ grpc_core::ExecCtx _local_exec_ctx; // Reset exec_ctx
attr.cq_polling_type = polling_types[i];
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, NULL);
@@ -289,7 +289,7 @@ static void test_pluck(void) {
attr.version = 1;
attr.cq_completion_type = GRPC_CQ_PLUCK;
for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) {
- ExecCtx _local_exec_ctx; // reset exec_ctx
+ grpc_core::ExecCtx _local_exec_ctx; // reset exec_ctx
attr.cq_polling_type = polling_types[pidx];
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, NULL);
diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc
index 6625e7e09f..0c818e0281 100644
--- a/test/core/surface/completion_queue_threading_test.cc
+++ b/test/core/surface/completion_queue_threading_test.cc
@@ -80,7 +80,7 @@ static void test_too_many_plucks(void) {
gpr_thd_id thread_ids[GPR_ARRAY_SIZE(tags)];
struct thread_state thread_states[GPR_ARRAY_SIZE(tags)];
gpr_thd_options thread_options = gpr_thd_options_default();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
unsigned i, j;
LOG_TEST("test_too_many_plucks");
@@ -142,7 +142,7 @@ static void free_completion(void* arg, grpc_cq_completion* completion) {
static void producer_thread(void* arg) {
test_thread_options* opt = static_cast<test_thread_options*>(arg);
int i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_INFO, "producer %d started", opt->id);
gpr_event_set(&opt->on_started, (void*)(intptr_t)1);
diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc
index b3999b481f..18d7f2f985 100644
--- a/test/core/surface/concurrent_connectivity_test.cc
+++ b/test/core/surface/concurrent_connectivity_test.cc
@@ -115,7 +115,7 @@ static void on_connect(void* vargs, grpc_endpoint* tcp,
void bad_server_thread(void* vargs) {
struct server_thread_args* args = (struct server_thread_args*)vargs;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_resolved_address resolved_addr;
struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr;
int port;
@@ -134,7 +134,7 @@ void bad_server_thread(void* vargs) {
gpr_mu_lock(args->mu);
while (gpr_atm_acq_load(&args->stop) == 0) {
- grpc_millis deadline = ExecCtx::Get()->Now() + 100;
+ grpc_millis deadline = grpc_core::ExecCtx::Get()->Now() + 100;
grpc_pollset_worker* worker = NULL;
if (!GRPC_LOG_IF_ERROR(
@@ -222,7 +222,7 @@ int run_concurrent_connectivity_test() {
gpr_atm_rel_store(&args.stop, 1);
gpr_thd_join(server);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_pollset_shutdown(args.pollset,
GRPC_CLOSURE_CREATE(done_pollset_shutdown, args.pollset,
grpc_schedule_on_exec_ctx));
diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc
index dd14a03577..54d55bf440 100644
--- a/test/core/surface/lame_client_test.cc
+++ b/test/core/surface/lame_client_test.cc
@@ -44,7 +44,7 @@ void test_transport_op(grpc_channel* channel) {
grpc_transport_op* op;
grpc_channel_element* elem;
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CLOSURE_INIT(&transport_op_cb, verify_connectivity, &state,
grpc_schedule_on_exec_ctx);
diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc
index bf51dac6dd..59fecf2d50 100644
--- a/test/core/surface/num_external_connectivity_watchers_test.cc
+++ b/test/core/surface/num_external_connectivity_watchers_test.cc
@@ -178,7 +178,7 @@ static grpc_channel* secure_test_create_channel(const char* addr) {
grpc_channel* channel =
grpc_secure_channel_create(ssl_creds, addr, new_client_args, NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(new_client_args);
}
grpc_channel_credentials_release(ssl_creds);
diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc
index dd9f907652..14afa6f18e 100644
--- a/test/core/surface/secure_channel_create_test.cc
+++ b/test/core/surface/secure_channel_create_test.cc
@@ -37,7 +37,7 @@ void test_unknown_scheme_target(void) {
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CHANNEL_INTERNAL_UNREF(chan, "test");
grpc_channel_credentials_unref(creds);
}
@@ -54,7 +54,7 @@ void test_security_connector_already_in_arg(void) {
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CHANNEL_INTERNAL_UNREF(chan, "test");
}
@@ -63,7 +63,7 @@ void test_null_creds(void) {
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CHANNEL_INTERNAL_UNREF(chan, "test");
}
diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc
index aae418cedb..5ad9ce65d1 100644
--- a/test/core/surface/sequential_connectivity_test.cc
+++ b/test/core/surface/sequential_connectivity_test.cc
@@ -156,7 +156,7 @@ static grpc_channel* secure_test_create_channel(const char* addr) {
grpc_channel* channel =
grpc_secure_channel_create(ssl_creds, addr, new_client_args, NULL);
{
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_args_destroy(new_client_args);
}
grpc_channel_credentials_release(ssl_creds);
diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc
index 4d41ece875..168807adde 100644
--- a/test/core/transport/bdp_estimator_test.cc
+++ b/test/core/transport/bdp_estimator_test.cc
@@ -58,7 +58,7 @@ namespace {
void AddSamples(BdpEstimator* estimator, int64_t* samples, size_t n) {
estimator->AddIncomingBytes(1234567);
inc_time();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
estimator->SchedulePing();
estimator->StartPing();
for (size_t i = 0; i < n; i++) {
@@ -66,7 +66,7 @@ void AddSamples(BdpEstimator* estimator, int64_t* samples, size_t n) {
}
gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_millis(1, GPR_TIMESPAN)));
- ExecCtx::Get()->InvalidateNow();
+ grpc_core::ExecCtx::Get()->InvalidateNow();
estimator->CompletePing();
}
diff --git a/test/core/transport/byte_stream_test.cc b/test/core/transport/byte_stream_test.cc
index 12a933f332..08dd91e4ec 100644
--- a/test/core/transport/byte_stream_test.cc
+++ b/test/core/transport/byte_stream_test.cc
@@ -36,7 +36,7 @@ static void not_called_closure(void* arg, grpc_error* error) {
static void test_slice_buffer_stream_basic(void) {
gpr_log(GPR_DEBUG, "test_slice_buffer_stream_basic");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
// Create and populate slice buffer.
grpc_slice_buffer buffer;
grpc_slice_buffer_init(&buffer);
@@ -70,7 +70,7 @@ static void test_slice_buffer_stream_basic(void) {
static void test_slice_buffer_stream_shutdown(void) {
gpr_log(GPR_DEBUG, "test_slice_buffer_stream_shutdown");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
// Create and populate slice buffer.
grpc_slice_buffer buffer;
grpc_slice_buffer_init(&buffer);
@@ -116,7 +116,7 @@ static void test_slice_buffer_stream_shutdown(void) {
static void test_caching_byte_stream_basic(void) {
gpr_log(GPR_DEBUG, "test_caching_byte_stream_basic");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
grpc_slice_buffer_init(&buffer);
@@ -155,7 +155,7 @@ static void test_caching_byte_stream_basic(void) {
static void test_caching_byte_stream_reset(void) {
gpr_log(GPR_DEBUG, "test_caching_byte_stream_reset");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
grpc_slice_buffer_init(&buffer);
@@ -201,7 +201,7 @@ static void test_caching_byte_stream_reset(void) {
static void test_caching_byte_stream_shared_cache(void) {
gpr_log(GPR_DEBUG, "test_caching_byte_stream_shared_cache");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
grpc_slice_buffer_init(&buffer);
diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc
index 3d463c40a5..897d3008b9 100644
--- a/test/core/transport/chttp2/bin_decoder_test.cc
+++ b/test/core/transport/chttp2/bin_decoder_test.cc
@@ -76,7 +76,7 @@ static grpc_slice base64_decode_with_length(const char* s,
s, grpc_chttp2_base64_decode_with_length(base64_encode(s), strlen(s)));
int main(int argc, char** argv) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* ENCODE_AND_DECODE tests grpc_chttp2_base64_decode_with_length(), which
takes encoded base64 strings without pad chars, but output length is
diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc
index fe4538339e..91e2ca376e 100644
--- a/test/core/transport/chttp2/hpack_encoder_test.cc
+++ b/test/core/transport/chttp2/hpack_encoder_test.cc
@@ -257,7 +257,7 @@ static void test_interned_key_indexed() {
static void run_test(void (*test)(), const char* name) {
gpr_log(GPR_INFO, "RUN TEST: %s", name);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hpack_compressor_init(&g_compressor);
test();
grpc_chttp2_hpack_compressor_destroy(&g_compressor);
diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
index feb27fc0ff..0dfd5ecc2d 100644
--- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
+++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
@@ -37,7 +37,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
grpc_init();
grpc_chttp2_hpack_parser parser;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hpack_parser_init(&parser);
parser.on_header = onhdr;
GRPC_ERROR_UNREF(grpc_chttp2_hpack_parser_parse(
diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc
index 69a13108f9..1bd3644fab 100644
--- a/test/core/transport/chttp2/hpack_parser_test.cc
+++ b/test/core/transport/chttp2/hpack_parser_test.cc
@@ -62,7 +62,7 @@ static void test_vector(grpc_chttp2_hpack_parser* parser,
grpc_slice_unref(input);
for (i = 0; i < nslices; i++) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(grpc_chttp2_hpack_parser_parse(parser, slices[i]) ==
GRPC_ERROR_NONE);
}
@@ -79,7 +79,7 @@ static void test_vector(grpc_chttp2_hpack_parser* parser,
static void test_vectors(grpc_slice_split_mode mode) {
grpc_chttp2_hpack_parser parser;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hpack_parser_init(&parser);
/* D.2.1 */
diff --git a/test/core/transport/chttp2/hpack_table_test.cc b/test/core/transport/chttp2/hpack_table_test.cc
index fd5604d857..97e1a02621 100644
--- a/test/core/transport/chttp2/hpack_table_test.cc
+++ b/test/core/transport/chttp2/hpack_table_test.cc
@@ -44,7 +44,7 @@ static void assert_index(const grpc_chttp2_hptbl* tbl, uint32_t idx,
}
static void test_static_lookup(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hptbl tbl;
grpc_chttp2_hptbl_init(&tbl);
@@ -123,7 +123,7 @@ static void test_many_additions(void) {
LOG_TEST("test_many_additions");
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hptbl_init(&tbl);
for (i = 0; i < 100000; i++) {
@@ -152,7 +152,7 @@ static void test_many_additions(void) {
static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl* tbl,
const char* key,
const char* value) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem md = grpc_mdelem_from_slices(
grpc_slice_from_copied_string(key), grpc_slice_from_copied_string(value));
grpc_chttp2_hptbl_find_result r = grpc_chttp2_hptbl_find(tbl, md);
@@ -162,7 +162,7 @@ static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl* tbl,
}
static void test_find(void) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_chttp2_hptbl tbl;
uint32_t i;
char buffer[32];
diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc
index 8ddd8bb2df..0ccf7ba288 100644
--- a/test/core/transport/connectivity_state_test.cc
+++ b/test/core/transport/connectivity_state_test.cc
@@ -57,7 +57,7 @@ static void test_connectivity_state_name(void) {
static void test_check(void) {
grpc_connectivity_state_tracker tracker;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_error* error;
gpr_log(GPR_DEBUG, "test_check");
grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx");
@@ -73,17 +73,17 @@ static void test_subscribe_then_unsubscribe(void) {
grpc_closure* closure =
GRPC_CLOSURE_CREATE(must_fail, THE_ARG, grpc_schedule_on_exec_ctx);
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_subscribe_then_unsubscribe");
g_counter = 0;
grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx");
GPR_ASSERT(grpc_connectivity_state_notify_on_state_change(&tracker, &state,
closure));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(state == GRPC_CHANNEL_IDLE);
GPR_ASSERT(g_counter == 0);
grpc_connectivity_state_notify_on_state_change(&tracker, NULL, closure);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(state == GRPC_CHANNEL_IDLE);
GPR_ASSERT(g_counter == 1);
@@ -95,13 +95,13 @@ static void test_subscribe_then_destroy(void) {
grpc_closure* closure =
GRPC_CLOSURE_CREATE(must_succeed, THE_ARG, grpc_schedule_on_exec_ctx);
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_subscribe_then_destroy");
g_counter = 0;
grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx");
GPR_ASSERT(grpc_connectivity_state_notify_on_state_change(&tracker, &state,
closure));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(state == GRPC_CHANNEL_IDLE);
GPR_ASSERT(g_counter == 0);
grpc_connectivity_state_destroy(&tracker);
@@ -115,13 +115,13 @@ static void test_subscribe_with_failure_then_destroy(void) {
grpc_closure* closure =
GRPC_CLOSURE_CREATE(must_fail, THE_ARG, grpc_schedule_on_exec_ctx);
grpc_connectivity_state state = GRPC_CHANNEL_SHUTDOWN;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_log(GPR_DEBUG, "test_subscribe_with_failure_then_destroy");
g_counter = 0;
grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_SHUTDOWN, "xxx");
GPR_ASSERT(0 == grpc_connectivity_state_notify_on_state_change(
&tracker, &state, closure));
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
GPR_ASSERT(state == GRPC_CHANNEL_SHUTDOWN);
GPR_ASSERT(g_counter == 0);
grpc_connectivity_state_destroy(&tracker);
diff --git a/test/core/transport/metadata_test.cc b/test/core/transport/metadata_test.cc
index 3d7034e4ce..e5bdc5901d 100644
--- a/test/core/transport/metadata_test.cc
+++ b/test/core/transport/metadata_test.cc
@@ -60,7 +60,7 @@ static void test_create_metadata(bool intern_keys, bool intern_values) {
intern_keys, intern_values);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
m1 = grpc_mdelem_from_slices(
maybe_intern(grpc_slice_from_static_string("a"), intern_keys),
maybe_intern(grpc_slice_from_static_string("b"), intern_values));
@@ -95,7 +95,7 @@ static void test_create_many_ephemeral_metadata(bool intern_keys,
intern_keys, intern_values);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* add, and immediately delete a bunch of different elements */
for (i = 0; i < MANY; i++) {
gpr_ltoa(i, buffer);
@@ -117,7 +117,7 @@ static void test_create_many_persistant_metadata(void) {
gpr_log(GPR_INFO, "test_create_many_persistant_metadata");
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
/* add phase */
for (i = 0; i < MANY; i++) {
gpr_ltoa(i, buffer);
@@ -151,7 +151,7 @@ static void test_spin_creating_the_same_thing(bool intern_keys,
intern_keys, intern_values);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem a, b, c;
GRPC_MDELEM_UNREF(
a = grpc_mdelem_from_slices(
@@ -178,7 +178,7 @@ static void test_identity_laws(bool intern_keys, bool intern_values) {
intern_keys, intern_values);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_mdelem a, b, c;
a = grpc_mdelem_from_slices(
maybe_intern(grpc_slice_from_static_string("a"), intern_keys),
@@ -225,7 +225,7 @@ static void test_things_stick_around(void) {
gpr_log(GPR_INFO, "test_things_stick_around");
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
for (i = 0; i < nstrs; i++) {
gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", i);
@@ -271,7 +271,7 @@ static void test_user_data_works(void) {
gpr_log(GPR_INFO, "test_user_data_works");
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
ud1 = static_cast<int*>(gpr_malloc(sizeof(int)));
*ud1 = 1;
ud2 = static_cast<int*>(gpr_malloc(sizeof(int)));
@@ -322,7 +322,7 @@ static void test_mdelem_sizes_in_hpack(bool intern_key, bool intern_value) {
gpr_log(GPR_INFO, "test_mdelem_size: intern_key=%d intern_value=%d",
intern_key, intern_value);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
uint8_t binary_value[BUFFER_SIZE] = {0};
for (uint8_t i = 0; i < BUFFER_SIZE; i++) {
@@ -346,7 +346,7 @@ static void test_copied_static_metadata(bool dup_key, bool dup_value) {
gpr_log(GPR_INFO, "test_static_metadata: dup_key=%d dup_value=%d", dup_key,
dup_value);
grpc_init();
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
for (size_t i = 0; i < GRPC_STATIC_MDELEM_COUNT; i++) {
grpc_mdelem p = GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[i],
diff --git a/test/core/transport/status_conversion_test.cc b/test/core/transport/status_conversion_test.cc
index 16ecd076a3..2a192e04ef 100644
--- a/test/core/transport/status_conversion_test.cc
+++ b/test/core/transport/status_conversion_test.cc
@@ -24,7 +24,7 @@
GPR_ASSERT(grpc_status_to_http2_error(a) == (b))
#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \
do { \
- ExecCtx _local_exec_ctx; \
+ grpc_core::ExecCtx _local_exec_ctx; \
GPR_ASSERT(grpc_http2_error_to_grpc_status(a, deadline) == (b)); \
\
} while (0)
diff --git a/test/core/util/port_server_client.cc b/test/core/util/port_server_client.cc
index 4e68ee3744..8e61145a26 100644
--- a/test/core/util/port_server_client.cc
+++ b/test/core/util/port_server_client.cc
@@ -62,7 +62,7 @@ void grpc_free_port_using_server(int port) {
grpc_httpcli_response rsp;
freereq pr;
char* path;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_closure* shutdown_closure;
grpc_init();
@@ -85,19 +85,20 @@ void grpc_free_port_using_server(int port) {
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("port_server_client/free");
grpc_httpcli_get(&context, &pr.pops, resource_quota, &req,
- ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
+ grpc_core::ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(freed_port_from_server, &pr,
grpc_schedule_on_exec_ctx),
&rsp);
grpc_resource_quota_unref_internal(resource_quota);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(pr.mu);
while (!pr.done) {
grpc_pollset_worker* worker = NULL;
if (!GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(grpc_polling_entity_pollset(&pr.pops), &worker,
- ExecCtx::Get()->Now() + GPR_MS_PER_SEC))) {
+ grpc_pollset_work(
+ grpc_polling_entity_pollset(&pr.pops), &worker,
+ grpc_core::ExecCtx::Get()->Now() + GPR_MS_PER_SEC))) {
pr.done = 1;
}
}
@@ -167,7 +168,7 @@ static void got_port_from_server(void* arg, grpc_error* error) {
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("port_server_client/pick_retry");
grpc_httpcli_get(pr->ctx, &pr->pops, resource_quota, &req,
- ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
+ grpc_core::ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(got_port_from_server, pr,
grpc_schedule_on_exec_ctx),
&pr->response);
@@ -193,7 +194,7 @@ int grpc_pick_port_using_server(void) {
grpc_httpcli_context context;
grpc_httpcli_request req;
portreq pr;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_closure* shutdown_closure;
grpc_init();
@@ -217,18 +218,19 @@ int grpc_pick_port_using_server(void) {
grpc_resource_quota_create("port_server_client/pick");
grpc_httpcli_get(
&context, &pr.pops, resource_quota, &req,
- ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
+ grpc_core::ExecCtx::Get()->Now() + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(got_port_from_server, &pr, grpc_schedule_on_exec_ctx),
&pr.response);
grpc_resource_quota_unref_internal(resource_quota);
- ExecCtx::Get()->Flush();
+ grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(pr.mu);
while (pr.port == -1) {
grpc_pollset_worker* worker = NULL;
if (!GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(grpc_polling_entity_pollset(&pr.pops), &worker,
- ExecCtx::Get()->Now() + GPR_MS_PER_SEC))) {
+ grpc_pollset_work(
+ grpc_polling_entity_pollset(&pr.pops), &worker,
+ grpc_core::ExecCtx::Get()->Now() + GPR_MS_PER_SEC))) {
pr.port = 0;
}
}
diff --git a/test/core/util/test_tcp_server.cc b/test/core/util/test_tcp_server.cc
index 7e17ff1f53..6418a7dfaa 100644
--- a/test/core/util/test_tcp_server.cc
+++ b/test/core/util/test_tcp_server.cc
@@ -55,7 +55,7 @@ void test_tcp_server_start(test_tcp_server* server, int port) {
grpc_resolved_address resolved_addr;
struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr;
int port_added;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
addr->sin_family = AF_INET;
addr->sin_port = htons((uint16_t)port);
@@ -76,7 +76,7 @@ void test_tcp_server_start(test_tcp_server* server, int port) {
void test_tcp_server_poll(test_tcp_server* server, int seconds) {
grpc_pollset_worker* worker = NULL;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_millis deadline = grpc_timespec_to_millis_round_up(
grpc_timeout_seconds_to_deadline(seconds));
gpr_mu_lock(server->mu);
@@ -91,7 +91,7 @@ static void finish_pollset(void* arg, grpc_error* error) {
}
void test_tcp_server_destroy(test_tcp_server* server) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_timespec shutdown_deadline;
grpc_closure do_nothing_cb;
grpc_tcp_server_unref(server->tcp_server);