diff options
Diffstat (limited to 'test/core/end2end/tests/connectivity.cc')
-rw-r--r-- | test/core/end2end/tests/connectivity.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/core/end2end/tests/connectivity.cc b/test/core/end2end/tests/connectivity.cc index a517ffa686..caa4265aa2 100644 --- a/test/core/end2end/tests/connectivity.cc +++ b/test/core/end2end/tests/connectivity.cc @@ -22,7 +22,7 @@ #include <grpc/support/sync.h> #include <grpc/support/time.h> -#include "src/core/lib/gpr/thd.h" +#include "src/core/lib/gprpp/thd.h" #include "test/core/end2end/cq_verifier.h" static void* tag(intptr_t t) { return (void*)t; } @@ -50,8 +50,6 @@ static void test_connectivity(grpc_end2end_test_config config) { grpc_connectivity_state state; cq_verifier* cqv = cq_verifier_create(f.cq); child_events ce; - gpr_thd_options thdopt = gpr_thd_options_default(); - gpr_thd_id thdid; grpc_channel_args client_args; grpc_arg arg_array[1]; @@ -67,9 +65,8 @@ static void test_connectivity(grpc_end2end_test_config config) { ce.channel = f.client; ce.cq = f.cq; gpr_event_init(&ce.started); - gpr_thd_options_set_joinable(&thdopt); - GPR_ASSERT( - gpr_thd_new(&thdid, "grpc_connectivity", child_thread, &ce, &thdopt)); + grpc_core::Thread thd("grpc_connectivity", child_thread, &ce); + thd.Start(); gpr_event_wait(&ce.started, gpr_inf_future(GPR_CLOCK_MONOTONIC)); @@ -86,7 +83,7 @@ static void test_connectivity(grpc_end2end_test_config config) { f.client, GRPC_CHANNEL_IDLE, gpr_now(GPR_CLOCK_MONOTONIC), f.cq, tag(1)); /* eventually the child thread completion should trigger */ - gpr_thd_join(thdid); + thd.Join(); /* check that we're still in idle, and start connecting */ GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 1) == |