diff options
Diffstat (limited to 'test/cpp/interop/client_helper.h')
-rw-r--r-- | test/cpp/interop/client_helper.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index c4361bb9de..92d5078f48 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -36,8 +36,9 @@ #include <memory> -#include <grpc++/config.h> -#include <grpc++/channel_interface.h> +#include <grpc++/channel.h> + +#include "src/core/surface/call.h" namespace grpc { namespace testing { @@ -46,9 +47,27 @@ grpc::string GetServiceAccountJsonKey(); grpc::string GetOauth2AccessToken(); -std::shared_ptr<ChannelInterface> CreateChannelForTestCase( +std::shared_ptr<Channel> CreateChannelForTestCase( const grpc::string& test_case); +class InteropClientContextInspector { + public: + InteropClientContextInspector(const ::grpc::ClientContext& context) + : context_(context) {} + + // Inspector methods, able to peek inside ClientContext, follow. + grpc_compression_algorithm GetCallCompressionAlgorithm() const { + return grpc_call_get_compression_algorithm(context_.call_); + } + + gpr_uint32 GetMessageFlags() const { + return grpc_call_get_message_flags(context_.call_); + } + + private: + const ::grpc::ClientContext& context_; +}; + } // namespace testing } // namespace grpc |