aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/interceptors_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/end2end/interceptors_util.cc')
-rw-r--r--test/cpp/end2end/interceptors_util.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/cpp/end2end/interceptors_util.cc b/test/cpp/end2end/interceptors_util.cc
index 29fb49d3eb..602d1695a3 100644
--- a/test/cpp/end2end/interceptors_util.cc
+++ b/test/cpp/end2end/interceptors_util.cc
@@ -131,5 +131,21 @@ bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map,
}
return false;
}
+
+std::unique_ptr<std::vector<
+ std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>
+CreateDummyClientInterceptors() {
+ auto creators = std::unique_ptr<std::vector<
+ std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>(
+ new std::vector<
+ std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>());
+ // Add 20 dummy interceptors before hijacking interceptor
+ for (auto i = 0; i < 20; i++) {
+ creators->push_back(std::unique_ptr<DummyInterceptorFactory>(
+ new DummyInterceptorFactory()));
+ }
+ return creators;
+}
+
} // namespace testing
} // namespace grpc