Merge pull request #2987 from dgquintas/removed_wrong_include_interop

Removed function introducing dependency on proto in .h
pull/2964/head
Yang Gao 9 years ago
commit 3526db5d1c
  1. 16
      test/cpp/interop/client_helper.cc
  2. 6
      test/cpp/interop/client_helper.h
  3. 14
      test/cpp/interop/interop_client.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) {}

@ -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);

@ -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)

Loading…
Cancel
Save