|
|
@ -254,7 +254,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> { |
|
|
|
|
|
|
|
|
|
|
|
// Setup server
|
|
|
|
// Setup server
|
|
|
|
ServerBuilder builder; |
|
|
|
ServerBuilder builder; |
|
|
|
auto server_creds = GetServerCredentials(GetParam().credentials_type); |
|
|
|
auto server_creds = GetCredentialsProvider()->GetServerCredentials( |
|
|
|
|
|
|
|
GetParam().credentials_type); |
|
|
|
builder.AddListeningPort(server_address_.str(), server_creds); |
|
|
|
builder.AddListeningPort(server_address_.str(), server_creds); |
|
|
|
builder.RegisterService(&service_); |
|
|
|
builder.RegisterService(&service_); |
|
|
|
cq_ = builder.AddCompletionQueue(); |
|
|
|
cq_ = builder.AddCompletionQueue(); |
|
|
@ -283,8 +284,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> { |
|
|
|
|
|
|
|
|
|
|
|
void ResetStub() { |
|
|
|
void ResetStub() { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
auto channel_creds = |
|
|
|
auto channel_creds = GetCredentialsProvider()->GetChannelCredentials( |
|
|
|
GetChannelCredentials(GetParam().credentials_type, &args); |
|
|
|
GetParam().credentials_type, &args); |
|
|
|
std::shared_ptr<Channel> channel = |
|
|
|
std::shared_ptr<Channel> channel = |
|
|
|
CreateCustomChannel(server_address_.str(), channel_creds, args); |
|
|
|
CreateCustomChannel(server_address_.str(), channel_creds, args); |
|
|
|
stub_ = grpc::testing::EchoTestService::NewStub(channel); |
|
|
|
stub_ = grpc::testing::EchoTestService::NewStub(channel); |
|
|
@ -892,8 +893,8 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { |
|
|
|
|
|
|
|
|
|
|
|
TEST_P(AsyncEnd2endTest, UnimplementedRpc) { |
|
|
|
TEST_P(AsyncEnd2endTest, UnimplementedRpc) { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
auto channel_creds = |
|
|
|
auto channel_creds = GetCredentialsProvider()->GetChannelCredentials( |
|
|
|
GetChannelCredentials(GetParam().credentials_type, &args); |
|
|
|
GetParam().credentials_type, &args); |
|
|
|
std::shared_ptr<Channel> channel = |
|
|
|
std::shared_ptr<Channel> channel = |
|
|
|
CreateCustomChannel(server_address_.str(), channel_creds, args); |
|
|
|
CreateCustomChannel(server_address_.str(), channel_creds, args); |
|
|
|
std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub; |
|
|
|
std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub; |
|
|
@ -1404,11 +1405,15 @@ std::vector<TestScenario> CreateTestScenarios(bool test_disable_blocking, |
|
|
|
std::vector<grpc::string> credentials_types; |
|
|
|
std::vector<grpc::string> credentials_types; |
|
|
|
std::vector<grpc::string> messages; |
|
|
|
std::vector<grpc::string> messages; |
|
|
|
|
|
|
|
|
|
|
|
credentials_types.push_back(kInsecureCredentialsType); |
|
|
|
if (GetCredentialsProvider()->GetChannelCredentials(kInsecureCredentialsType, |
|
|
|
auto sec_list = GetSecureCredentialsTypeList(); |
|
|
|
nullptr) != nullptr) { |
|
|
|
|
|
|
|
credentials_types.push_back(kInsecureCredentialsType); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
auto sec_list = GetCredentialsProvider()->GetSecureCredentialsTypeList(); |
|
|
|
for (auto sec = sec_list.begin(); sec != sec_list.end(); sec++) { |
|
|
|
for (auto sec = sec_list.begin(); sec != sec_list.end(); sec++) { |
|
|
|
credentials_types.push_back(*sec); |
|
|
|
credentials_types.push_back(*sec); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
GPR_ASSERT(!credentials_types.empty()); |
|
|
|
|
|
|
|
|
|
|
|
messages.push_back("Hello"); |
|
|
|
messages.push_back("Hello"); |
|
|
|
for (int sz = 1; sz < test_big_limit; sz *= 2) { |
|
|
|
for (int sz = 1; sz < test_big_limit; sz *= 2) { |
|
|
|