aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-08-19 21:47:15 -0700
committerGravatar Yang Gao <yangg@google.com>2015-08-19 21:47:15 -0700
commit2262bf790096247556446aff1b3fd686f1a59ef2 (patch)
tree1247566ede06f82cf9c7a1c50c6c9c44a00f0642
parentb714648e517ccb647eaa2d79f529f3a0e6067ddf (diff)
parent5fd685556f485103aa7cbae2e6d8305d18f1a659 (diff)
Merge pull request #3002 from dgquintas/client_helper_to_headers
Moved methods' impl to header for simplicity
-rw-r--r--test/cpp/interop/client_helper.cc14
-rw-r--r--test/cpp/interop/client_helper.h14
2 files changed, 11 insertions, 17 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc
index b8a222c54a..da5627de95 100644
--- a/test/cpp/interop/client_helper.cc
+++ b/test/cpp/interop/client_helper.cc
@@ -52,7 +52,6 @@
#include "test/core/security/oauth2_utils.h"
#include "test/cpp/util/create_test_channel.h"
-#include "src/core/surface/call.h"
#include "src/cpp/client/secure_credentials.h"
DECLARE_bool(enable_ssl);
@@ -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 grpc
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index 000374ae8e..edc69e90ac 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -39,6 +39,8 @@
#include <grpc++/config.h>
#include <grpc++/channel_interface.h>
+#include "src/core/surface/call.h"
+
namespace grpc {
namespace testing {
@@ -51,11 +53,17 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase(
class InteropClientContextInspector {
public:
- InteropClientContextInspector(const ::grpc::ClientContext& context);
+ InteropClientContextInspector(const ::grpc::ClientContext& context)
+ : context_(context) {}
// Inspector methods, able to peek inside ClientContext, follow.
- grpc_compression_algorithm GetCallCompressionAlgorithm() const;
- gpr_uint32 GetMessageFlags() const;
+ 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_;