aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2018-11-30 08:57:28 -0800
committerGravatar yang-g <yangg@google.com>2018-11-30 08:57:38 -0800
commite75fc243daa36e6eee8742289ee47101f4a82afe (patch)
tree71632a4fecd07b597a1a818bb3da3684f99bb088 /test/core/iomgr
parent2a938b0006c098cba1c559afacdd311c55afa723 (diff)
change tests to use the new class instead of grpc_test_init
Diffstat (limited to 'test/core/iomgr')
-rw-r--r--test/core/iomgr/buffer_list_test.cc2
-rw-r--r--test/core/iomgr/combiner_test.cc2
-rw-r--r--test/core/iomgr/endpoint_pair_test.cc2
-rw-r--r--test/core/iomgr/error_test.cc2
-rw-r--r--test/core/iomgr/ev_epollex_linux_test.cc2
-rw-r--r--test/core/iomgr/fd_conservation_posix_test.cc2
-rw-r--r--test/core/iomgr/fd_posix_test.cc2
-rw-r--r--test/core/iomgr/grpc_ipv6_loopback_available_test.cc2
-rw-r--r--test/core/iomgr/load_file_test.cc2
-rw-r--r--test/core/iomgr/resolve_address_posix_test.cc2
-rw-r--r--test/core/iomgr/resolve_address_test.cc2
-rw-r--r--test/core/iomgr/resource_quota_test.cc2
-rw-r--r--test/core/iomgr/sockaddr_utils_test.cc2
-rw-r--r--test/core/iomgr/socket_utils_test.cc2
-rw-r--r--test/core/iomgr/tcp_client_posix_test.cc2
-rw-r--r--test/core/iomgr/tcp_client_uv_test.cc2
-rw-r--r--test/core/iomgr/tcp_posix_test.cc2
-rw-r--r--test/core/iomgr/tcp_server_posix_test.cc2
-rw-r--r--test/core/iomgr/tcp_server_uv_test.cc2
-rw-r--r--test/core/iomgr/time_averaged_stats_test.cc2
-rw-r--r--test/core/iomgr/timer_heap_test.cc2
-rw-r--r--test/core/iomgr/timer_list_test.cc4
-rw-r--r--test/core/iomgr/udp_server_test.cc2
23 files changed, 24 insertions, 24 deletions
diff --git a/test/core/iomgr/buffer_list_test.cc b/test/core/iomgr/buffer_list_test.cc
index e104e8e91a..eca8f76e67 100644
--- a/test/core/iomgr/buffer_list_test.cc
+++ b/test/core/iomgr/buffer_list_test.cc
@@ -97,7 +97,7 @@ static void TestTcpBufferList() {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
TestTcpBufferList();
grpc_shutdown();
diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc
index cf2c7db846..c39c3fc8fc 100644
--- a/test/core/iomgr/combiner_test.cc
+++ b/test/core/iomgr/combiner_test.cc
@@ -144,7 +144,7 @@ static void test_execute_finally(void) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
test_no_op();
test_execute_one();
diff --git a/test/core/iomgr/endpoint_pair_test.cc b/test/core/iomgr/endpoint_pair_test.cc
index ad38076b51..3ddbe7f2fc 100644
--- a/test/core/iomgr/endpoint_pair_test.cc
+++ b/test/core/iomgr/endpoint_pair_test.cc
@@ -60,7 +60,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/error_test.cc b/test/core/iomgr/error_test.cc
index d78a8c2af3..3ba90147aa 100644
--- a/test/core/iomgr/error_test.cc
+++ b/test/core/iomgr/error_test.cc
@@ -215,7 +215,7 @@ static void test_overflow() {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
test_set_get_int();
test_set_get_str();
diff --git a/test/core/iomgr/ev_epollex_linux_test.cc b/test/core/iomgr/ev_epollex_linux_test.cc
index 08d1e68b39..faa3ef344a 100644
--- a/test/core/iomgr/ev_epollex_linux_test.cc
+++ b/test/core/iomgr/ev_epollex_linux_test.cc
@@ -92,7 +92,7 @@ static void test_pollable_owner_fd() {
int main(int argc, char** argv) {
const char* poll_strategy = nullptr;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/fd_conservation_posix_test.cc b/test/core/iomgr/fd_conservation_posix_test.cc
index 4866e350d5..0d27b94dc2 100644
--- a/test/core/iomgr/fd_conservation_posix_test.cc
+++ b/test/core/iomgr/fd_conservation_posix_test.cc
@@ -29,7 +29,7 @@ int main(int argc, char** argv) {
struct rlimit rlim;
grpc_endpoint_pair p;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc
index 4ea2389bbd..cf5ffc6354 100644
--- a/test/core/iomgr/fd_posix_test.cc
+++ b/test/core/iomgr/fd_posix_test.cc
@@ -515,7 +515,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc
index 329aa9a851..2ef1f1978d 100644
--- a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc
+++ b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc
@@ -32,7 +32,7 @@
#endif
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
// This test assumes that the ipv6 loopback is available
// in all environments in which grpc tests run in.
diff --git a/test/core/iomgr/load_file_test.cc b/test/core/iomgr/load_file_test.cc
index 38c8710535..a0e0e4d7a7 100644
--- a/test/core/iomgr/load_file_test.cc
+++ b/test/core/iomgr/load_file_test.cc
@@ -152,7 +152,7 @@ static void test_load_big_file(void) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
test_load_empty_file();
test_load_failure();
diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc
index e495e4c877..ceeb70a108 100644
--- a/test/core/iomgr/resolve_address_posix_test.cc
+++ b/test/core/iomgr/resolve_address_posix_test.cc
@@ -158,7 +158,7 @@ static void test_unix_socket_path_name_too_long(void) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc
index 8d69bab5b1..1d9e1ee27e 100644
--- a/test/core/iomgr/resolve_address_test.cc
+++ b/test/core/iomgr/resolve_address_test.cc
@@ -271,7 +271,7 @@ int main(int argc, char** argv) {
abort();
}
// Run the test.
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/resource_quota_test.cc b/test/core/iomgr/resource_quota_test.cc
index f3b35fed32..4cbc016d58 100644
--- a/test/core/iomgr/resource_quota_test.cc
+++ b/test/core/iomgr/resource_quota_test.cc
@@ -891,7 +891,7 @@ static void test_thread_maxquota_change() {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
gpr_mu_init(&g_mu);
gpr_cv_init(&g_cv);
diff --git a/test/core/iomgr/sockaddr_utils_test.cc b/test/core/iomgr/sockaddr_utils_test.cc
index 3783f968b7..250d36a74a 100644
--- a/test/core/iomgr/sockaddr_utils_test.cc
+++ b/test/core/iomgr/sockaddr_utils_test.cc
@@ -270,7 +270,7 @@ static void test_sockaddr_set_get_port(void) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
test_sockaddr_is_v4mapped();
test_sockaddr_to_v4mapped();
diff --git a/test/core/iomgr/socket_utils_test.cc b/test/core/iomgr/socket_utils_test.cc
index a21f3fac62..420873734d 100644
--- a/test/core/iomgr/socket_utils_test.cc
+++ b/test/core/iomgr/socket_utils_test.cc
@@ -80,7 +80,7 @@ static const grpc_socket_mutator_vtable mutator_vtable = {
int main(int argc, char** argv) {
int sock;
grpc_error* err;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
sock = socket(PF_INET, SOCK_STREAM, 0);
GPR_ASSERT(sock > 0);
diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc
index 90fc5aecfc..5cf3530c77 100644
--- a/test/core/iomgr/tcp_client_posix_test.cc
+++ b/test/core/iomgr/tcp_client_posix_test.cc
@@ -191,7 +191,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
diff --git a/test/core/iomgr/tcp_client_uv_test.cc b/test/core/iomgr/tcp_client_uv_test.cc
index 27f894e3f3..bde8c2f353 100644
--- a/test/core/iomgr/tcp_client_uv_test.cc
+++ b/test/core/iomgr/tcp_client_uv_test.cc
@@ -188,7 +188,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc
index 6447cc234d..80f17a914f 100644
--- a/test/core/iomgr/tcp_posix_test.cc
+++ b/test/core/iomgr/tcp_posix_test.cc
@@ -623,7 +623,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
grpc_core::grpc_tcp_set_write_timestamps_callback(timestamps_verifier);
{
diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc
index d646df1dae..2c66cdec77 100644
--- a/test/core/iomgr/tcp_server_posix_test.cc
+++ b/test/core/iomgr/tcp_server_posix_test.cc
@@ -437,7 +437,7 @@ int main(int argc, char** argv) {
// Zalloc dst_addrs to avoid oversized frames.
test_addrs* dst_addrs =
static_cast<test_addrs*>(gpr_zalloc(sizeof(*dst_addrs)));
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/tcp_server_uv_test.cc b/test/core/iomgr/tcp_server_uv_test.cc
index e99fa79bfd..625a18c0cc 100644
--- a/test/core/iomgr/tcp_server_uv_test.cc
+++ b/test/core/iomgr/tcp_server_uv_test.cc
@@ -288,7 +288,7 @@ static void destroy_pollset(void* p, grpc_error* error) {
int main(int argc, char** argv) {
grpc_closure destroyed;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
{
grpc_core::ExecCtx exec_ctx;
diff --git a/test/core/iomgr/time_averaged_stats_test.cc b/test/core/iomgr/time_averaged_stats_test.cc
index b932e62d1f..2923a35d1b 100644
--- a/test/core/iomgr/time_averaged_stats_test.cc
+++ b/test/core/iomgr/time_averaged_stats_test.cc
@@ -180,7 +180,7 @@ static void some_regress_some_persist_test(void) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
no_regress_no_persist_test_1();
no_regress_no_persist_test_2();
no_regress_no_persist_test_3();
diff --git a/test/core/iomgr/timer_heap_test.cc b/test/core/iomgr/timer_heap_test.cc
index ebe5e6610d..872cf17486 100644
--- a/test/core/iomgr/timer_heap_test.cc
+++ b/test/core/iomgr/timer_heap_test.cc
@@ -286,7 +286,7 @@ static void shrink_test(void) {
int main(int argc, char** argv) {
int i;
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
for (i = 0; i < 5; i++) {
test1();
diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc
index fd65d1abf1..fa2444948b 100644
--- a/test/core/iomgr/timer_list_test.cc
+++ b/test/core/iomgr/timer_list_test.cc
@@ -221,7 +221,7 @@ void long_running_service_cleanup_test(void) {
int main(int argc, char** argv) {
/* Tests with default g_start_time */
{
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_core::ExecCtx::GlobalInit();
grpc_core::ExecCtx exec_ctx;
grpc_determine_iomgr_platform();
@@ -235,7 +235,7 @@ int main(int argc, char** argv) {
/* Begin long running service tests */
{
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
/* Set g_start_time back 25 days. */
/* We set g_start_time here in case there are any initialization
dependencies that use g_start_time. */
diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc
index d167c0131f..f65783a017 100644
--- a/test/core/iomgr/udp_server_test.cc
+++ b/test/core/iomgr/udp_server_test.cc
@@ -360,7 +360,7 @@ static void test_receive(int number_of_clients) {
}
int main(int argc, char** argv) {
- grpc_test_init(argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
grpc_init();
if (grpc_is_socket_reuse_port_supported()) {
g_num_listeners = 10;