aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-07-13 14:25:31 -0700
committerGravatar GitHub <noreply@github.com>2017-07-13 14:25:31 -0700
commitabcdfc9676c46a7f04091cf0e7f84f0e2b3fcf86 (patch)
treed45b2b1833c0995e3211f46e0704268e02ce7b80 /test
parent5a5062becb96e3eae33ac21ef95224cedf32fde7 (diff)
parente251fbac20bd27d0b57c3a87696cc300575e04f2 (diff)
Merge pull request #11803 from ctiller/spin-init
Add a test of repeatedly calling grpc_init then grpc_shutdown
Diffstat (limited to 'test')
-rw-r--r--test/core/surface/init_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/surface/init_test.c b/test/core/surface/init_test.c
index 47900c51d7..a9e80575af 100644
--- a/test/core/surface/init_test.c
+++ b/test/core/surface/init_test.c
@@ -52,6 +52,13 @@ static void test_plugin() {
GPR_ASSERT(g_flag == 2);
}
+static void test_repeatedly() {
+ for (int i = 0; i < 100000; i++) {
+ grpc_init();
+ grpc_shutdown();
+ }
+}
+
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
test(1);
@@ -59,5 +66,6 @@ int main(int argc, char **argv) {
test(3);
test_mixed();
test_plugin();
+ test_repeatedly();
return 0;
}