|
|
|
@ -42,6 +42,9 @@ |
|
|
|
|
#include "src/core/lib/gprpp/debug_location.h" |
|
|
|
|
#include "src/core/lib/gprpp/ref_counted_ptr.h" |
|
|
|
|
#include "src/core/lib/iomgr/tcp_client.h" |
|
|
|
|
#include "src/core/lib/security/credentials/fake/fake_credentials.h" |
|
|
|
|
#include "src/cpp/client/secure_credentials.h" |
|
|
|
|
#include "src/cpp/server/secure_server_credentials.h" |
|
|
|
|
|
|
|
|
|
#include "src/proto/grpc/testing/echo.grpc.pb.h" |
|
|
|
|
#include "test/core/util/port.h" |
|
|
|
@ -207,7 +210,9 @@ class ClientLbEnd2endTest : public ::testing::Test { |
|
|
|
|
} // else, default to pick first
|
|
|
|
|
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, |
|
|
|
|
response_generator_.get()); |
|
|
|
|
return CreateCustomChannel("fake:///", InsecureChannelCredentials(), args); |
|
|
|
|
std::shared_ptr<ChannelCredentials> creds(new SecureChannelCredentials( |
|
|
|
|
grpc_fake_transport_security_credentials_create())); |
|
|
|
|
return CreateCustomChannel("fake:///", std::move(creds), args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool SendRpc( |
|
|
|
@ -277,8 +282,9 @@ class ClientLbEnd2endTest : public ::testing::Test { |
|
|
|
|
std::ostringstream server_address; |
|
|
|
|
server_address << server_host << ":" << port_; |
|
|
|
|
ServerBuilder builder; |
|
|
|
|
builder.AddListeningPort(server_address.str(), |
|
|
|
|
InsecureServerCredentials()); |
|
|
|
|
std::shared_ptr<ServerCredentials> creds(new SecureServerCredentials( |
|
|
|
|
grpc_fake_transport_security_server_credentials_create())); |
|
|
|
|
builder.AddListeningPort(server_address.str(), std::move(creds)); |
|
|
|
|
builder.RegisterService(&service_); |
|
|
|
|
server_ = builder.BuildAndStart(); |
|
|
|
|
std::lock_guard<std::mutex> lock(*mu); |
|
|
|
|