wip
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc
index 48b1b2e..9df79bd 100644
--- a/test/cpp/interop/client_helper.cc
+++ b/test/cpp/interop/client_helper.cc
@@ -48,10 +48,13 @@
#include <grpc++/create_channel.h>
#include <grpc++/credentials.h>
#include <grpc++/stream.h>
-#include "src/cpp/client/secure_credentials.h"
+
#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);
DECLARE_bool(use_prod_roots);
DECLARE_int32(server_port);
@@ -62,6 +65,8 @@
DECLARE_string(service_account_key_file);
DECLARE_string(oauth_scope);
+using grpc::testing::CompressionType;
+
namespace grpc {
namespace testing {
@@ -137,5 +142,29 @@
}
}
+CompressionType GetInteropCompressionTypeFromCompressionAlgorithm(
+ grpc_compression_algorithm algorithm) {
+ switch (algorithm) {
+ case GRPC_COMPRESS_NONE:
+ return CompressionType::NONE;
+ case GRPC_COMPRESS_GZIP:
+ return CompressionType::GZIP;
+ case GRPC_COMPRESS_DEFLATE:
+ return CompressionType::DEFLATE;
+ default:
+ GPR_ASSERT(false);
+ }
+}
+
+InteropClientContextInspector::InteropClientContextInspector(
+ const ::grpc::ClientContext& context)
+ : context_(context) {}
+
+grpc_compression_algorithm
+InteropClientContextInspector::GetCallCompressionAlgorithm() const {
+ return grpc_call_get_compression_algorithm(context_.call_);
+}
+
+
} // namespace testing
} // namespace grpc