aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/client_helper.h
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-26 08:50:19 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-26 08:50:19 -0700
commit0608a00b505fe43a52614ec8703bb589332af064 (patch)
tree72937fe6fb2423e52134af3ce2a4beea73da69d3 /test/cpp/interop/client_helper.h
parentd8fc8606740416b1cbe4d2f3754705b108fd2c5c (diff)
parentafbbaf9c3e21b6a4fe41242df9d052e077dc25c0 (diff)
Merge remote-tracking branch 'upstream/master' into csharp_upgrade_to_proto3
Conflicts: src/csharp/Grpc.IntegrationTesting/InteropClient.cs
Diffstat (limited to 'test/cpp/interop/client_helper.h')
-rw-r--r--test/cpp/interop/client_helper.h25
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