aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/bad_client/bad_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/bad_client/bad_client.cc')
-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);