interceptors_util.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #include <condition_variable>
20 
21 #include <gtest/gtest.h>
22 
23 #include <grpcpp/channel.h>
24 
25 #include "src/proto/grpc/testing/echo.grpc.pb.h"
27 
28 namespace grpc {
29 namespace testing {
30 /* This interceptor does nothing. Just keeps a global count on the number of
31  * times it was invoked. */
33  public:
35 
37  if (methods->QueryInterceptionHookPoint(
40  } else if (methods->QueryInterceptionHookPoint(
42  POST_RECV_INITIAL_METADATA)) {
44  } else if (methods->QueryInterceptionHookPoint(
47  }
48  methods->Proceed();
49  }
50 
51  static void Reset() {
52  num_times_run_.store(0);
53  num_times_run_reverse_.store(0);
54  num_times_cancel_.store(0);
55  }
56 
57  static int GetNumTimesRun() {
59  return num_times_run_.load();
60  }
61 
62  static int GetNumTimesCancel() { return num_times_cancel_.load(); }
63 
64  private:
65  static std::atomic<int> num_times_run_;
66  static std::atomic<int> num_times_run_reverse_;
67  static std::atomic<int> num_times_cancel_;
68 };
69 
73  public:
75  experimental::ClientRpcInfo* /*info*/) override {
76  return new PhonyInterceptor();
77  }
78 
80  experimental::ServerRpcInfo* /*info*/) override {
81  return new PhonyInterceptor();
82  }
83 };
84 
85 /* This interceptor can be used to test the interception mechanism. */
87  public:
88  TestInterceptor(const std::string& method, const char* suffix_for_stats,
90  EXPECT_EQ(info->method(), method);
91 
92  if (suffix_for_stats == nullptr || info->suffix_for_stats() == nullptr) {
93  EXPECT_EQ(info->suffix_for_stats(), suffix_for_stats);
94  } else {
95  EXPECT_EQ(strcmp(info->suffix_for_stats(), suffix_for_stats), 0);
96  }
97  }
98 
100  methods->Proceed();
101  }
102 };
103 
106  public:
108  const char* suffix_for_stats)
109  : method_(method), suffix_for_stats_(suffix_for_stats) {}
110 
112  experimental::ClientRpcInfo* info) override {
113  return new TestInterceptor(method_, suffix_for_stats_, info);
114  }
115 
116  private:
118  const char* suffix_for_stats_;
119 };
120 
121 /* This interceptor factory returns nullptr on interceptor creation */
125  public:
127  experimental::ClientRpcInfo* /*info*/) override {
128  return nullptr;
129  }
130 
132  experimental::ServerRpcInfo* /*info*/) override {
133  return nullptr;
134  }
135 };
136 
137 class EchoTestServiceStreamingImpl : public EchoTestService::Service {
138  public:
140 
141  Status Echo(ServerContext* context, const EchoRequest* request,
142  EchoResponse* response) override {
143  auto client_metadata = context->client_metadata();
144  for (const auto& pair : client_metadata) {
145  context->AddTrailingMetadata(ToString(pair.first), ToString(pair.second));
146  }
147  response->set_message(request->message());
148  return Status::OK;
149  }
150 
154  EchoRequest req;
155  EchoResponse resp;
156  auto client_metadata = context->client_metadata();
157  for (const auto& pair : client_metadata) {
158  context->AddTrailingMetadata(ToString(pair.first), ToString(pair.second));
159  }
160 
161  while (stream->Read(&req)) {
162  resp.set_message(req.message());
164  }
165  return Status::OK;
166  }
167 
170  EchoResponse* resp) override {
171  auto client_metadata = context->client_metadata();
172  for (const auto& pair : client_metadata) {
173  context->AddTrailingMetadata(ToString(pair.first), ToString(pair.second));
174  }
175 
176  EchoRequest req;
177  string response_str = "";
178  while (reader->Read(&req)) {
179  response_str += req.message();
180  }
181  resp->set_message(response_str);
182  return Status::OK;
183  }
184 
187  auto client_metadata = context->client_metadata();
188  for (const auto& pair : client_metadata) {
189  context->AddTrailingMetadata(ToString(pair.first), ToString(pair.second));
190  }
191 
192  EchoResponse resp;
193  resp.set_message(req->message());
194  for (int i = 0; i < 10; i++) {
195  EXPECT_TRUE(writer->Write(resp));
196  }
197  return Status::OK;
198  }
199 };
200 
201 constexpr int kNumStreamingMessages = 10;
202 
203 void MakeCall(const std::shared_ptr<Channel>& channel,
204  const StubOptions& options = StubOptions());
205 
206 void MakeClientStreamingCall(const std::shared_ptr<Channel>& channel);
207 
208 void MakeServerStreamingCall(const std::shared_ptr<Channel>& channel);
209 
210 void MakeBidiStreamingCall(const std::shared_ptr<Channel>& channel);
211 
212 void MakeAsyncCQCall(const std::shared_ptr<Channel>& channel);
213 
214 void MakeAsyncCQClientStreamingCall(const std::shared_ptr<Channel>& channel);
215 
216 void MakeAsyncCQServerStreamingCall(const std::shared_ptr<Channel>& channel);
217 
218 void MakeAsyncCQBidiStreamingCall(const std::shared_ptr<Channel>& channel);
219 
220 void MakeCallbackCall(const std::shared_ptr<Channel>& channel);
221 
222 bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map,
223  const string& key, const string& value);
224 
225 bool CheckMetadata(const std::multimap<std::string, std::string>& map,
226  const string& key, const string& value);
227 
228 std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
230 
231 inline void* tag(int i) { return reinterpret_cast<void*>(i); }
232 inline int detag(void* p) {
233  return static_cast<int>(reinterpret_cast<intptr_t>(p));
234 }
235 
236 class Verifier {
237  public:
239  // Expect sets the expected ok value for a specific tag
240  Verifier& Expect(int i, bool expect_ok) {
241  return ExpectUnless(i, expect_ok, false);
242  }
243  // ExpectUnless sets the expected ok value for a specific tag
244  // unless the tag was already marked seen (as a result of ExpectMaybe)
245  Verifier& ExpectUnless(int i, bool expect_ok, bool seen) {
246  if (!seen) {
247  expectations_[tag(i)] = expect_ok;
248  }
249  return *this;
250  }
251  // ExpectMaybe sets the expected ok value for a specific tag, but does not
252  // require it to appear
253  // If it does, sets *seen to true
254  Verifier& ExpectMaybe(int i, bool expect_ok, bool* seen) {
255  if (!*seen) {
256  maybe_expectations_[tag(i)] = MaybeExpect{expect_ok, seen};
257  }
258  return *this;
259  }
260 
261  // Next waits for 1 async tag to complete, checks its
262  // expectations, and returns the tag
263  int Next(CompletionQueue* cq, bool ignore_ok) {
264  bool ok;
265  void* got_tag;
266  EXPECT_TRUE(cq->Next(&got_tag, &ok));
267  GotTag(got_tag, ok, ignore_ok);
268  return detag(got_tag);
269  }
270 
271  template <typename T>
273  CompletionQueue* cq, void** got_tag, bool* ok, T deadline,
274  std::function<void(void)> lambda) {
275  if (lambda_run_) {
276  return cq->AsyncNext(got_tag, ok, deadline);
277  } else {
278  lambda_run_ = true;
279  return cq->DoThenAsyncNext(lambda, got_tag, ok, deadline);
280  }
281  }
282 
283  // Verify keeps calling Next until all currently set
284  // expected tags are complete
285  void Verify(CompletionQueue* cq) { Verify(cq, false); }
286 
287  // This version of Verify allows optionally ignoring the
288  // outcome of the expectation
289  void Verify(CompletionQueue* cq, bool ignore_ok) {
290  GPR_ASSERT(!expectations_.empty() || !maybe_expectations_.empty());
291  while (!expectations_.empty()) {
292  Next(cq, ignore_ok);
293  }
294  }
295 
296  // This version of Verify stops after a certain deadline, and uses the
297  // DoThenAsyncNext API
298  // to call the lambda
301  const std::function<void(void)>& lambda) {
302  if (expectations_.empty()) {
303  bool ok;
304  void* got_tag;
305  EXPECT_EQ(DoOnceThenAsyncNext(cq, &got_tag, &ok, deadline, lambda),
307  } else {
308  while (!expectations_.empty()) {
309  bool ok;
310  void* got_tag;
311  EXPECT_EQ(DoOnceThenAsyncNext(cq, &got_tag, &ok, deadline, lambda),
313  GotTag(got_tag, ok, false);
314  }
315  }
316  }
317 
318  private:
319  void GotTag(void* got_tag, bool ok, bool ignore_ok) {
320  auto it = expectations_.find(got_tag);
321  if (it != expectations_.end()) {
322  if (!ignore_ok) {
323  EXPECT_EQ(it->second, ok);
324  }
325  expectations_.erase(it);
326  } else {
327  auto it2 = maybe_expectations_.find(got_tag);
328  if (it2 != maybe_expectations_.end()) {
329  if (it2->second.seen != nullptr) {
330  EXPECT_FALSE(*it2->second.seen);
331  *it2->second.seen = true;
332  }
333  if (!ignore_ok) {
334  EXPECT_EQ(it2->second.ok, ok);
335  }
336  } else {
337  gpr_log(GPR_ERROR, "Unexpected tag: %p", got_tag);
338  abort();
339  }
340  }
341  }
342 
343  struct MaybeExpect {
344  bool ok;
345  bool* seen;
346  };
347 
348  std::map<void*, bool> expectations_;
349  std::map<void*, MaybeExpect> maybe_expectations_;
351 };
352 
353 } // namespace testing
354 } // namespace grpc
grpc::experimental::ServerInterceptorFactoryInterface
Definition: impl/codegen/server_interceptor.h:45
EXPECT_FALSE
#define EXPECT_FALSE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1970
testing
Definition: aws_request_signer_test.cc:25
grpc::testing::EchoTestServiceStreamingImpl::RequestStream
Status RequestStream(ServerContext *context, ServerReader< EchoRequest > *reader, EchoResponse *resp) override
Definition: interceptors_util.h:168
grpc::ServerWriter
Definition: include/grpcpp/impl/codegen/completion_queue.h:60
regen-readme.it
it
Definition: regen-readme.py:15
grpc::ServerContext
Definition: grpcpp/impl/codegen/server_context.h:566
grpc::testing::PhonyInterceptor::Reset
static void Reset()
Definition: interceptors_util.h:51
grpc::testing::MakeCallbackCall
void MakeCallbackCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:159
grpc::testing::Verifier::Verify
void Verify(CompletionQueue *cq, bool ignore_ok)
Definition: interceptors_util.h:289
grpc::experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA
@ PRE_SEND_INITIAL_METADATA
The first three in this list are for clients and servers.
grpc::testing::EchoTestServiceStreamingImpl
Definition: interceptors_util.h:137
grpc
Definition: grpcpp/alarm.h:33
grpc::testing::MakeBidiStreamingCall
void MakeBidiStreamingCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:85
grpc::CompletionQueue::GOT_EVENT
@ GOT_EVENT
Definition: include/grpcpp/impl/codegen/completion_queue.h:126
grpc::testing::Verifier::Expect
Verifier & Expect(int i, bool expect_ok)
Definition: interceptors_util.h:240
false
#define false
Definition: setup_once.h:323
absl::time_internal::cctz::time_point
std::chrono::time_point< std::chrono::system_clock, D > time_point
Definition: abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h:39
grpc::testing::EchoTestServiceStreamingImpl::~EchoTestServiceStreamingImpl
~EchoTestServiceStreamingImpl() override
Definition: interceptors_util.h:139
options
double_dict options[]
Definition: capstone_test.c:55
benchmark.request
request
Definition: benchmark.py:77
grpc::experimental::ClientInterceptorFactoryInterface
Definition: impl/codegen/client_interceptor.h:48
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc::testing::MakeAsyncCQCall
void MakeAsyncCQCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:104
grpc::testing::MakeAsyncCQClientStreamingCall
void MakeAsyncCQClientStreamingCall(const std::shared_ptr< Channel > &)
Definition: interceptors_util.cc:122
grpc::CompletionQueue::NextStatus
NextStatus
Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT.
Definition: include/grpcpp/impl/codegen/completion_queue.h:124
grpc::experimental::ClientRpcInfo::method
const char * method() const
Return the fully-specified method name.
Definition: impl/codegen/client_interceptor.h:90
grpc::ServerReaderWriter
Definition: grpcpp/impl/codegen/sync_stream.h:786
grpc::experimental::InterceptorBatchMethods::QueryInterceptionHookPoint
virtual bool QueryInterceptionHookPoint(InterceptionHookPoints type)=0
grpc::testing::NullInterceptorFactory::CreateClientInterceptor
experimental::Interceptor * CreateClientInterceptor(experimental::ClientRpcInfo *) override
Definition: interceptors_util.h:126
grpc::testing::EchoTestServiceStreamingImpl::BidiStream
Status BidiStream(ServerContext *context, grpc::ServerReaderWriter< EchoResponse, EchoRequest > *stream) override
Definition: interceptors_util.h:151
grpc::testing::TestInterceptorFactory::method_
std::string method_
Definition: interceptors_util.h:117
grpc::testing::Verifier::maybe_expectations_
std::map< void *, MaybeExpect > maybe_expectations_
Definition: interceptors_util.h:349
grpc::testing::Verifier::MaybeExpect
Definition: interceptors_util.h:343
map
zval * map
Definition: php/ext/google/protobuf/encode_decode.c:480
absl::base_internal::Next
static AllocList * Next(int i, AllocList *prev, LowLevelAlloc::Arena *arena)
Definition: abseil-cpp/absl/base/internal/low_level_alloc.cc:453
T
#define T(upbtypeconst, upbtype, ctype, default_value)
grpc::experimental::ClientRpcInfo
Definition: impl/codegen/client_interceptor.h:68
grpc::testing::detag
int detag(void *p)
Definition: interceptors_util.h:232
grpc::experimental::InterceptionHookPoints::PRE_SEND_CANCEL
@ PRE_SEND_CANCEL
grpc::testing::PhonyInterceptor::num_times_run_
static std::atomic< int > num_times_run_
Definition: interceptors_util.h:65
grpc::WriteOptions
Per-message write options.
Definition: call_op_set.h:81
grpc::testing::Verifier::Verifier
Verifier()
Definition: interceptors_util.h:238
grpc::testing::PhonyInterceptor::GetNumTimesCancel
static int GetNumTimesCancel()
Definition: interceptors_util.h:62
grpc::testing::PhonyInterceptorFactory::CreateServerInterceptor
experimental::Interceptor * CreateServerInterceptor(experimental::ServerRpcInfo *) override
Definition: interceptors_util.h:79
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
grpc::testing::PhonyInterceptor::num_times_cancel_
static std::atomic< int > num_times_cancel_
Definition: interceptors_util.h:67
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
grpc::testing::NullInterceptorFactory
Definition: interceptors_util.h:122
grpc::testing::Verifier::Next
int Next(CompletionQueue *cq, bool ignore_ok)
Definition: interceptors_util.h:263
grpc::testing::Verifier::lambda_run_
bool lambda_run_
Definition: interceptors_util.h:350
req
static uv_connect_t req
Definition: test-connection-fail.c:30
grpc::testing::TestInterceptorFactory
Definition: interceptors_util.h:104
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
http2_server_health_check.resp
resp
Definition: http2_server_health_check.py:31
grpc::testing::Verifier::expectations_
std::map< void *, bool > expectations_
Definition: interceptors_util.h:348
grpc::testing::PhonyInterceptor::PhonyInterceptor
PhonyInterceptor()
Definition: interceptors_util.h:34
grpc::testing::Verifier::ExpectMaybe
Verifier & ExpectMaybe(int i, bool expect_ok, bool *seen)
Definition: interceptors_util.h:254
expectations_
std::map< void *, bool > expectations_
Definition: async_end2end_test.cc:201
grpc::testing::PhonyInterceptor::Intercept
void Intercept(experimental::InterceptorBatchMethods *methods) override
Definition: interceptors_util.h:36
grpc::testing::PhonyInterceptorFactory
Definition: interceptors_util.h:70
grpc::testing::Verifier::GotTag
void GotTag(void *got_tag, bool ok, bool ignore_ok)
Definition: interceptors_util.h:319
channel.h
intptr_t
_W64 signed int intptr_t
Definition: stdint-msvc2008.h:118
grpc::Status::OK
static const Status & OK
An OK pre-defined instance.
Definition: include/grpcpp/impl/codegen/status.h:113
grpc::testing::Verifier::Verify
void Verify(CompletionQueue *cq, std::chrono::system_clock::time_point deadline, const std::function< void(void)> &lambda)
Definition: interceptors_util.h:299
grpc::testing::PhonyInterceptor
Definition: interceptors_util.h:32
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
grpc::testing::TestInterceptor
Definition: interceptors_util.h:86
grpc::testing::Verifier::MaybeExpect::seen
bool * seen
Definition: interceptors_util.h:345
grpc::testing::NullInterceptorFactory::CreateServerInterceptor
experimental::Interceptor * CreateServerInterceptor(experimental::ServerRpcInfo *) override
Definition: interceptors_util.h:131
grpc::testing::MakeCall
void MakeCall(const std::shared_ptr< Channel > &channel, const StubOptions &options)
Definition: interceptors_util.cc:32
grpc::experimental::ClientRpcInfo::suffix_for_stats
const char * suffix_for_stats() const
Definition: impl/codegen/client_interceptor.h:94
grpc::experimental::InterceptorBatchMethods
Definition: impl/codegen/interceptor.h:98
grpc::testing::tag
static void * tag(intptr_t t)
Definition: h2_ssl_cert_test.cc:263
writer
void writer(void *n)
Definition: libuv/docs/code/locks/main.c:22
value
const char * value
Definition: hpack_parser_table.cc:165
grpc::testing::PhonyInterceptorFactory::CreateClientInterceptor
experimental::Interceptor * CreateClientInterceptor(experimental::ClientRpcInfo *) override
Definition: interceptors_util.h:74
grpc::testing::Verifier::DoOnceThenAsyncNext
CompletionQueue::NextStatus DoOnceThenAsyncNext(CompletionQueue *cq, void **got_tag, bool *ok, T deadline, std::function< void(void)> lambda)
Definition: interceptors_util.h:272
key
const char * key
Definition: hpack_parser_table.cc:164
grpc::testing::CreatePhonyClientInterceptors
std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface > > CreatePhonyClientInterceptors()
Definition: interceptors_util.cc:205
grpc::testing::TestInterceptorFactory::TestInterceptorFactory
TestInterceptorFactory(const std::string &method, const char *suffix_for_stats)
Definition: interceptors_util.h:107
grpc::testing::MakeServerStreamingCall
void MakeServerStreamingCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:66
grpc::testing::TestInterceptor::Intercept
void Intercept(experimental::InterceptorBatchMethods *methods) override
Definition: interceptors_util.h:99
lambda_run_
bool lambda_run_
Definition: async_end2end_test.cc:203
grpc::testing::MakeAsyncCQServerStreamingCall
void MakeAsyncCQServerStreamingCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:127
grpc::experimental::Interceptor
Definition: impl/codegen/interceptor.h:221
grpc::testing::ToString
std::string ToString(const grpc::string_ref &r)
Definition: string_ref_helper.cc:24
grpc::experimental::ServerRpcInfo
Definition: impl/codegen/server_interceptor.h:58
asyncio_get_stats.response
response
Definition: asyncio_get_stats.py:28
grpc::CompletionQueue::TIMEOUT
@ TIMEOUT
deadline was reached.
Definition: include/grpcpp/impl/codegen/completion_queue.h:128
grpc::testing::Verifier::MaybeExpect::ok
bool ok
Definition: interceptors_util.h:344
grpc::testing::MakeClientStreamingCall
void MakeClientStreamingCall(const std::shared_ptr< Channel > &channel)
Definition: interceptors_util.cc:46
grpc::testing::PhonyInterceptor::num_times_run_reverse_
static std::atomic< int > num_times_run_reverse_
Definition: interceptors_util.h:66
grpc::ServerReader
Definition: include/grpcpp/impl/codegen/completion_queue.h:58
grpc::StubOptions
Useful interface for generated stubs.
Definition: grpcpp/impl/codegen/stub_options.h:27
grpc::Status
Definition: include/grpcpp/impl/codegen/status.h:35
ok
bool ok
Definition: async_end2end_test.cc:197
grpc::testing::TestInterceptor::TestInterceptor
TestInterceptor(const std::string &method, const char *suffix_for_stats, experimental::ClientRpcInfo *info)
Definition: interceptors_util.h:88
grpc::testing::TestInterceptorFactory::CreateClientInterceptor
experimental::Interceptor * CreateClientInterceptor(experimental::ClientRpcInfo *info) override
Definition: interceptors_util.h:111
grpc::testing::EXPECT_EQ
EXPECT_EQ(options.token_exchange_service_uri, "https://foo/exchange")
grpc::testing::MakeAsyncCQBidiStreamingCall
void MakeAsyncCQBidiStreamingCall(const std::shared_ptr< Channel > &)
Definition: interceptors_util.cc:155
grpc::testing::Verifier::Verify
void Verify(CompletionQueue *cq)
Definition: interceptors_util.h:285
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
grpc::testing::kNumStreamingMessages
constexpr int kNumStreamingMessages
Definition: interceptors_util.h:201
maybe_expectations_
std::map< void *, MaybeExpect > maybe_expectations_
Definition: async_end2end_test.cc:202
grpc::testing::EXPECT_TRUE
EXPECT_TRUE(grpc::experimental::StsCredentialsOptionsFromJson(minimum_valid_json, &options) .ok())
grpc::CompletionQueue
Definition: include/grpcpp/impl/codegen/completion_queue.h:104
grpc::testing::TestInterceptorFactory::suffix_for_stats_
const char * suffix_for_stats_
Definition: interceptors_util.h:118
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
grpc::testing::EchoTestServiceStreamingImpl::ResponseStream
Status ResponseStream(ServerContext *context, const EchoRequest *req, ServerWriter< EchoResponse > *writer) override
Definition: interceptors_util.h:185
method
NSString * method
Definition: ProtoMethod.h:28
grpc::experimental::InterceptorBatchMethods::Proceed
virtual void Proceed()=0
grpc::testing::EchoTestServiceStreamingImpl::Echo
Status Echo(ServerContext *context, const EchoRequest *request, EchoResponse *response) override
Definition: interceptors_util.h:141
seen
bool * seen
Definition: async_end2end_test.cc:198
string_ref_helper.h
grpc::testing::Verifier::ExpectUnless
Verifier & ExpectUnless(int i, bool expect_ok, bool seen)
Definition: interceptors_util.h:245
grpc::testing::PhonyInterceptor::GetNumTimesRun
static int GetNumTimesRun()
Definition: interceptors_util.h:57
pair
std::pair< std::string, std::string > pair
Definition: abseil-cpp/absl/container/internal/raw_hash_set_benchmark.cc:78
grpc::experimental::InterceptionHookPoints
InterceptionHookPoints
Definition: impl/codegen/interceptor.h:59
grpc::testing::CheckMetadata
bool CheckMetadata(const std::multimap< grpc::string_ref, grpc::string_ref > &map, const string &key, const string &value)
Definition: interceptors_util.cc:184
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
reader
void reader(void *n)
Definition: libuv/docs/code/locks/main.c:8
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
stream
voidpf stream
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:21