Add a blocking init/shutdown test

pull/21642/head
yang-g 5 years ago
parent 1326593d3f
commit 88d5971870
  1. 8
      test/core/surface/init_test.cc

@ -75,6 +75,13 @@ static void test_repeatedly() {
grpc_maybe_wait_for_async_shutdown(); grpc_maybe_wait_for_async_shutdown();
} }
static void test_repeatedly_blocking() {
for (int i = 0; i < 1000; i++) {
grpc_init();
grpc_shutdown_blocking();
}
}
int main(int argc, char** argv) { int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv); grpc::testing::TestEnvironment env(argc, argv);
test(1); test(1);
@ -86,5 +93,6 @@ int main(int argc, char** argv) {
test_mixed(); test_mixed();
test_plugin(); test_plugin();
test_repeatedly(); test_repeatedly();
test_repeatedly_blocking();
return 0; return 0;
} }

Loading…
Cancel
Save