|
|
@ -265,7 +265,8 @@ class ServerInterceptorsEnd2endSyncUnaryTest : public ::testing::Test { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncUnaryTest, UnaryTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncUnaryTest, UnaryTest) { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
auto channel = grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
MakeCall(channel); |
|
|
|
MakeCall(channel); |
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
@ -308,7 +309,8 @@ class ServerInterceptorsEnd2endSyncStreamingTest : public ::testing::Test { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ClientStreamingTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ClientStreamingTest) { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
auto channel = grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
MakeClientStreamingCall(channel); |
|
|
|
MakeClientStreamingCall(channel); |
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
@ -317,7 +319,8 @@ TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ClientStreamingTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ServerStreamingTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ServerStreamingTest) { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
auto channel = grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
MakeServerStreamingCall(channel); |
|
|
|
MakeServerStreamingCall(channel); |
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
@ -326,7 +329,8 @@ TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ServerStreamingTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, BidiStreamingTest) { |
|
|
|
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, BidiStreamingTest) { |
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
DummyInterceptor::Reset(); |
|
|
|
auto channel = grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address_, InsecureChannelCredentials()); |
|
|
|
MakeBidiStreamingCall(channel); |
|
|
|
MakeBidiStreamingCall(channel); |
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
@ -356,7 +360,8 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, UnaryTest) { |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
|
|
|
|
|
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
auto channel = grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
auto stub = grpc::testing::EchoTestService::NewStub(channel); |
|
|
|
auto stub = grpc::testing::EchoTestService::NewStub(channel); |
|
|
|
|
|
|
|
|
|
|
|
EchoRequest send_request; |
|
|
|
EchoRequest send_request; |
|
|
@ -428,7 +433,8 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, BidiStreamingTest) { |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
|
|
|
|
|
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
auto channel = grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
auto stub = grpc::testing::EchoTestService::NewStub(channel); |
|
|
|
auto stub = grpc::testing::EchoTestService::NewStub(channel); |
|
|
|
|
|
|
|
|
|
|
|
EchoRequest send_request; |
|
|
|
EchoRequest send_request; |
|
|
@ -509,7 +515,8 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, GenericRPCTest) { |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
auto server = builder.BuildAndStart(); |
|
|
|
|
|
|
|
|
|
|
|
ChannelArguments args; |
|
|
|
ChannelArguments args; |
|
|
|
auto channel = grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
auto channel = |
|
|
|
|
|
|
|
grpc::CreateChannel(server_address, InsecureChannelCredentials()); |
|
|
|
GenericStub generic_stub(channel); |
|
|
|
GenericStub generic_stub(channel); |
|
|
|
|
|
|
|
|
|
|
|
const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); |
|
|
|
const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); |
|
|
|