diff options
author | 2015-10-09 10:57:08 -0700 | |
---|---|---|
committer | 2015-10-09 10:57:08 -0700 | |
commit | 1f0846d127de35916cb04181fb8fecfcbd07636b (patch) | |
tree | d3b36f771aff20cad2b56430c0a8a4b607c6c714 /test | |
parent | 2ccbb91f188b3ca598b9b54d17c6c2c0087497c5 (diff) | |
parent | 0c331880d0062f39f434ba8ad2341252e38bed79 (diff) |
Merge pull request #3692 from dgquintas/inspector_fail
Fixed unprotected access to call field
Diffstat (limited to 'test')
-rw-r--r-- | test/core/end2end/tests/compressed_payload.c | 11 | ||||
-rw-r--r-- | test/cpp/interop/client_helper.h | 6 | ||||
-rw-r--r-- | test/cpp/interop/server_helper.cc | 6 |
3 files changed, 12 insertions, 11 deletions
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index a4614a2aba..f321fe1e7c 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -46,7 +46,7 @@ #include "test/core/end2end/cq_verifier.h" #include "src/core/channel/channel_args.h" #include "src/core/channel/compress_filter.h" -#include "src/core/surface/call.h" +#include "src/core/surface/call_test_only.h" enum { TIMEOUT = 200000 }; @@ -196,12 +196,13 @@ static void request_with_payload_template( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); - GPR_ASSERT(GPR_BITCOUNT(grpc_call_get_encodings_accepted_by_peer(s)) == 3); - GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s), + GPR_ASSERT( + GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer(s)) == 3); + GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), GRPC_COMPRESS_NONE) != 0); - GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s), + GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), GRPC_COMPRESS_DEFLATE) != 0); - GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s), + GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), GRPC_COMPRESS_GZIP) != 0); op = ops; diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index 0221df93db..ace193042e 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -38,7 +38,7 @@ #include <grpc++/channel.h> -#include "src/core/surface/call.h" +#include "src/core/surface/call_test_only.h" namespace grpc { namespace testing { @@ -57,11 +57,11 @@ class InteropClientContextInspector { // Inspector methods, able to peek inside ClientContext, follow. grpc_compression_algorithm GetCallCompressionAlgorithm() const { - return grpc_call_get_compression_algorithm(context_.call_); + return grpc_call_test_only_get_compression_algorithm(context_.call_); } gpr_uint32 GetMessageFlags() const { - return grpc_call_get_message_flags(context_.call_); + return grpc_call_test_only_get_message_flags(context_.call_); } private: diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 4570750846..5138a38170 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -38,7 +38,7 @@ #include <gflags/gflags.h> #include <grpc++/security/server_credentials.h> -#include "src/core/surface/call.h" +#include "src/core/surface/call_test_only.h" #include "test/core/end2end/data/ssl_test_data.h" DECLARE_bool(use_tls); @@ -65,11 +65,11 @@ InteropServerContextInspector::InteropServerContextInspector( grpc_compression_algorithm InteropServerContextInspector::GetCallCompressionAlgorithm() const { - return grpc_call_get_compression_algorithm(context_.call_); + return grpc_call_test_only_get_compression_algorithm(context_.call_); } gpr_uint32 InteropServerContextInspector::GetEncodingsAcceptedByClient() const { - return grpc_call_get_encodings_accepted_by_peer(context_.call_); + return grpc_call_test_only_get_encodings_accepted_by_peer(context_.call_); } std::shared_ptr<const AuthContext> |