aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/bad_client
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-02-13 14:40:39 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-02-15 21:30:13 -0800
commit58a62755fc6546a117b7b8f3a0a344f85b2ea5f9 (patch)
tree294e8432672a2a8b3b2bd1bab7d24e75e1a6d4b6 /test/core/bad_client
parentb0d71823a0f031ad1c04be30f22653177139da0b (diff)
Remove support for detached threads. All threads must be joined.
Diffstat (limited to 'test/core/bad_client')
-rw-r--r--test/core/bad_client/bad_client.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index 6055ccbf4b..9abc1c40d9 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -220,11 +220,11 @@ void grpc_run_bad_client_test(
/* Check a ground truth */
GPR_ASSERT(grpc_server_has_open_connections(a.server));
- gpr_thd_id id;
+ gpr_thd_id server_validator_id;
gpr_event_init(&a.done_thd);
a.validator = server_validator;
/* Start validator */
- gpr_thd_new(&id, "grpc_bad_client", thd_func, &a, nullptr);
+ gpr_thd_new(&server_validator_id, "grpc_bad_client", thd_func, &a);
for (int i = 0; i < num_args; i++) {
grpc_run_client_side_validator(&args[i], i == (num_args - 1) ? flags : 0,
&sfd, client_cq);
@@ -234,6 +234,7 @@ void grpc_run_bad_client_test(
/* Shutdown. */
shutdown_client(&sfd.client);
+ gpr_thd_join(server_validator_id);
shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
grpc_server_shutdown_and_notify(a.server, shutdown_cq, nullptr);