diff options
author | 2017-11-14 18:11:22 -0800 | |
---|---|---|
committer | 2017-11-14 18:11:22 -0800 | |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /test/core/client_channel/resolvers | |
parent | 75122c23578e24417dcf64081c737571a9fc2dbc (diff) |
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'test/core/client_channel/resolvers')
4 files changed, 14 insertions, 14 deletions
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(); |