diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /test/core/iomgr/tcp_server_posix_test.cc | |
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/iomgr/tcp_server_posix_test.cc')
-rw-r--r-- | test/core/iomgr/tcp_server_posix_test.cc | 15 |
1 files changed, 8 insertions, 7 deletions
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); |