aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/handshake
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/handshake')
-rw-r--r--test/core/handshake/client_ssl.cc13
-rw-r--r--test/core/handshake/readahead_handshaker_server_ssl.cc1
-rw-r--r--test/core/handshake/server_ssl.cc1
-rw-r--r--test/core/handshake/server_ssl_common.cc13
-rw-r--r--test/core/handshake/server_ssl_common.h1
5 files changed, 12 insertions, 17 deletions
diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc
index fe2ab251e3..8ac763ac4b 100644
--- a/test/core/handshake/client_ssl.cc
+++ b/test/core/handshake/client_ssl.cc
@@ -35,7 +35,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include "src/core/lib/gpr/thd.h"
+#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -230,12 +230,11 @@ static bool client_ssl_test(char* server_alpn_preferred) {
GPR_ASSERT(server_socket > 0 && port > 0);
// Launch the TLS server thread.
- gpr_thd_options thdopt = gpr_thd_options_default();
- gpr_thd_id thdid;
- gpr_thd_options_set_joinable(&thdopt);
server_args args = {server_socket, server_alpn_preferred};
- GPR_ASSERT(gpr_thd_new(&thdid, "grpc_client_ssl_test", server_thread, &args,
- &thdopt));
+ bool ok;
+ grpc_core::Thread thd("grpc_client_ssl_test", server_thread, &args, &ok);
+ GPR_ASSERT(ok);
+ thd.Start();
// Load key pair and establish client SSL credentials.
grpc_ssl_pem_key_cert_pair pem_key_cert_pair;
@@ -303,7 +302,7 @@ static bool client_ssl_test(char* server_alpn_preferred) {
grpc_slice_unref(key_slice);
grpc_slice_unref(ca_slice);
- gpr_thd_join(thdid);
+ thd.Join();
grpc_shutdown();
diff --git a/test/core/handshake/readahead_handshaker_server_ssl.cc b/test/core/handshake/readahead_handshaker_server_ssl.cc
index 80000ca8d3..9788320e0d 100644
--- a/test/core/handshake/readahead_handshaker_server_ssl.cc
+++ b/test/core/handshake/readahead_handshaker_server_ssl.cc
@@ -30,7 +30,6 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/server_ssl.cc b/test/core/handshake/server_ssl.cc
index f0465c8e3e..8fa5f7fb35 100644
--- a/test/core/handshake/server_ssl.cc
+++ b/test/core/handshake/server_ssl.cc
@@ -30,7 +30,6 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc
index d202a7cfd6..41b2829d8b 100644
--- a/test/core/handshake/server_ssl_common.cc
+++ b/test/core/handshake/server_ssl_common.cc
@@ -32,7 +32,7 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include "src/core/lib/gpr/thd.h"
+#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -138,11 +138,10 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len,
gpr_event_init(&client_handshake_complete);
// Launch the gRPC server thread.
- gpr_thd_options thdopt = gpr_thd_options_default();
- gpr_thd_id thdid;
- gpr_thd_options_set_joinable(&thdopt);
- GPR_ASSERT(
- gpr_thd_new(&thdid, "grpc_ssl_test", server_thread, &port, &thdopt));
+ bool ok;
+ grpc_core::Thread thd("grpc_ssl_test", server_thread, &port, &ok);
+ GPR_ASSERT(ok);
+ thd.Start();
SSL_load_error_strings();
OpenSSL_add_ssl_algorithms();
@@ -235,7 +234,7 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len,
EVP_cleanup();
close(sock);
- gpr_thd_join(thdid);
+ thd.Join();
grpc_shutdown();
diff --git a/test/core/handshake/server_ssl_common.h b/test/core/handshake/server_ssl_common.h
index f726a1cd3a..32bc6f9897 100644
--- a/test/core/handshake/server_ssl_common.h
+++ b/test/core/handshake/server_ssl_common.h
@@ -26,7 +26,6 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
-#include "src/core/lib/gpr/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"