diff options
Diffstat (limited to 'test/core/bad_client')
-rw-r--r-- | test/core/bad_client/bad_client.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index 9abc1c40d9..c03ebcf409 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -29,7 +29,7 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/gpr/murmur_hash.h" #include "src/core/lib/gpr/string.h" -#include "src/core/lib/gpr/thd.h" +#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/completion_queue.h" @@ -220,11 +220,12 @@ void grpc_run_bad_client_test( /* Check a ground truth */ GPR_ASSERT(grpc_server_has_open_connections(a.server)); - gpr_thd_id server_validator_id; gpr_event_init(&a.done_thd); a.validator = server_validator; /* Start validator */ - gpr_thd_new(&server_validator_id, "grpc_bad_client", thd_func, &a); + + grpc_core::Thread server_validator_thd("grpc_bad_client", thd_func, &a); + server_validator_thd.Start(); 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,7 +235,7 @@ void grpc_run_bad_client_test( /* Shutdown. */ shutdown_client(&sfd.client); - gpr_thd_join(server_validator_id); + server_validator_thd.Join(); shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); grpc_server_shutdown_and_notify(a.server, shutdown_cq, nullptr); |