aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-08-18 16:46:53 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-08-18 16:46:53 -0700
commit81491b60430d5ca488cdd6e2e28f3bc2f5d9c6e2 (patch)
tree9a927a394fbbeb0c8648f841e9b8d8ba7e52c077
parent0137ae35612e9f3a8849b92cb6a9bd27cb64d33b (diff)
Removed function introducing dependency on proto in .h
-rw-r--r--test/cpp/interop/client_helper.cc16
-rw-r--r--test/cpp/interop/client_helper.h6
-rw-r--r--test/cpp/interop/interop_client.cc14
3 files changed, 14 insertions, 22 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc
index 65fdc63b43..b8a222c54a 100644
--- a/test/cpp/interop/client_helper.cc
+++ b/test/cpp/interop/client_helper.cc
@@ -65,8 +65,6 @@ DECLARE_string(default_service_account);
DECLARE_string(service_account_key_file);
DECLARE_string(oauth_scope);
-using grpc::testing::CompressionType;
-
namespace grpc {
namespace testing {
@@ -143,20 +141,6 @@ std::shared_ptr<ChannelInterface> CreateChannelForTestCase(
}
}
-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) {}
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index 28fca3266c..000374ae8e 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -39,8 +39,6 @@
#include <grpc++/config.h>
#include <grpc++/channel_interface.h>
-#include "test/proto/messages.grpc.pb.h"
-
namespace grpc {
namespace testing {
@@ -51,10 +49,6 @@ grpc::string GetOauth2AccessToken();
std::shared_ptr<ChannelInterface> CreateChannelForTestCase(
const grpc::string& test_case);
-grpc::testing::CompressionType
-GetInteropCompressionTypeFromCompressionAlgorithm(
- grpc_compression_algorithm algorithm);
-
class InteropClientContextInspector {
public:
InteropClientContextInspector(const ::grpc::ClientContext& context);
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index ddf91aa5eb..9e738b6d3b 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -67,6 +67,20 @@ const int kResponseMessageSize = 1030;
const int kReceiveDelayMilliSeconds = 20;
const int kLargeRequestSize = 271828;
const int kLargeResponseSize = 314159;
+
+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);
+ }
+}
} // namespace
InteropClient::InteropClient(std::shared_ptr<ChannelInterface> channel)