aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/resolve_address_posix_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/iomgr/resolve_address_posix_test.c')
-rw-r--r--test/core/iomgr/resolve_address_posix_test.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/core/iomgr/resolve_address_posix_test.c b/test/core/iomgr/resolve_address_posix_test.c
index 6ab4ace99d..be193deca3 100644
--- a/test/core/iomgr/resolve_address_posix_test.c
+++ b/test/core/iomgr/resolve_address_posix_test.c
@@ -159,16 +159,13 @@ static void test_unix_socket_path_name_too_long(void) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
- grpc_executor_init();
- grpc_iomgr_init();
- grpc_iomgr_start();
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_iomgr_init(&exec_ctx);
+ grpc_iomgr_start(&exec_ctx);
test_unix_socket();
test_unix_socket_path_name_too_long();
- {
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_executor_shutdown(&exec_ctx);
- grpc_iomgr_shutdown(&exec_ctx);
- grpc_exec_ctx_finish(&exec_ctx);
- }
+ grpc_executor_shutdown(&exec_ctx);
+ grpc_iomgr_shutdown(&exec_ctx);
+ grpc_exec_ctx_finish(&exec_ctx);
return 0;
}