|
|
|
@ -40,6 +40,10 @@ |
|
|
|
|
#include <gtest/gtest.h> |
|
|
|
|
|
|
|
|
|
namespace grpc { |
|
|
|
|
|
|
|
|
|
namespace experimental { |
|
|
|
|
void TestOnlyResetGlobalClientInterceptorFactory(); |
|
|
|
|
} |
|
|
|
|
namespace testing { |
|
|
|
|
namespace { |
|
|
|
|
|
|
|
|
@ -894,6 +898,7 @@ TEST_F(ClientGlobalInterceptorEnd2endTest, DummyGlobalInterceptor) { |
|
|
|
|
MakeCall(channel); |
|
|
|
|
// Make sure all 20 dummy interceptors were run with the global interceptor
|
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 21); |
|
|
|
|
experimental::TestOnlyResetGlobalClientInterceptorFactory(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_F(ClientGlobalInterceptorEnd2endTest, LoggingGlobalInterceptor) { |
|
|
|
@ -917,6 +922,7 @@ TEST_F(ClientGlobalInterceptorEnd2endTest, LoggingGlobalInterceptor) { |
|
|
|
|
MakeCall(channel); |
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
|
experimental::TestOnlyResetGlobalClientInterceptorFactory(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_F(ClientGlobalInterceptorEnd2endTest, HijackingGlobalInterceptor) { |
|
|
|
@ -940,6 +946,7 @@ TEST_F(ClientGlobalInterceptorEnd2endTest, HijackingGlobalInterceptor) { |
|
|
|
|
MakeCall(channel); |
|
|
|
|
// Make sure all 20 dummy interceptors were run
|
|
|
|
|
EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20); |
|
|
|
|
experimental::TestOnlyResetGlobalClientInterceptorFactory(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|