Skip to content
Snippets Groups Projects
Commit 2262bf79 authored by Yang Gao's avatar Yang Gao
Browse files

Merge pull request #3002 from dgquintas/client_helper_to_headers

Moved methods' impl to header for simplicity
parents b714648e 5fd68555
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "test/core/security/oauth2_utils.h" #include "test/core/security/oauth2_utils.h"
#include "test/cpp/util/create_test_channel.h" #include "test/cpp/util/create_test_channel.h"
#include "src/core/surface/call.h"
#include "src/cpp/client/secure_credentials.h" #include "src/cpp/client/secure_credentials.h"
DECLARE_bool(enable_ssl); DECLARE_bool(enable_ssl);
...@@ -141,18 +140,5 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( ...@@ -141,18 +140,5 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase(
} }
} }
InteropClientContextInspector::InteropClientContextInspector(
const ::grpc::ClientContext& context)
: context_(context) {}
grpc_compression_algorithm
InteropClientContextInspector::GetCallCompressionAlgorithm() const {
return grpc_call_get_compression_algorithm(context_.call_);
}
gpr_uint32 InteropClientContextInspector::GetMessageFlags() const {
return grpc_call_get_message_flags(context_.call_);
}
} // namespace testing } // namespace testing
} // namespace grpc } // namespace grpc
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <grpc++/config.h> #include <grpc++/config.h>
#include <grpc++/channel_interface.h> #include <grpc++/channel_interface.h>
#include "src/core/surface/call.h"
namespace grpc { namespace grpc {
namespace testing { namespace testing {
...@@ -51,11 +53,17 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase( ...@@ -51,11 +53,17 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase(
class InteropClientContextInspector { class InteropClientContextInspector {
public: public:
InteropClientContextInspector(const ::grpc::ClientContext& context); InteropClientContextInspector(const ::grpc::ClientContext& context)
: context_(context) {}
// Inspector methods, able to peek inside ClientContext, follow. // Inspector methods, able to peek inside ClientContext, follow.
grpc_compression_algorithm GetCallCompressionAlgorithm() const; grpc_compression_algorithm GetCallCompressionAlgorithm() const {
gpr_uint32 GetMessageFlags() const; return grpc_call_get_compression_algorithm(context_.call_);
}
gpr_uint32 GetMessageFlags() const {
return grpc_call_get_message_flags(context_.call_);
}
private: private:
const ::grpc::ClientContext& context_; const ::grpc::ClientContext& context_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment