cq_verifier_native.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 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 <grpc/support/alloc.h>
20 
22 
23 /* the verifier itself */
24 struct cq_verifier {
25  /* bound completion queue */
27  /* start of expectation list */
29 };
30 
32  cq_verifier* v = static_cast<cq_verifier*>(gpr_malloc(sizeof(cq_verifier)));
33  v->cq = cq;
35  return v;
36 }
37 
39  cq_verify(v);
40  gpr_free(v);
41 }
42 
44  return v->first_expectation;
45 }
46 
48  v->first_expectation = e;
49 }
50 
52  const gpr_timespec deadline =
54  return grpc_completion_queue_next(v->cq, deadline, nullptr);
55 }
cq_verifier_internal.h
cq_verifier_set_first_expectation
void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e)
Definition: cq_verifier_native.cc:47
grpc_timeout_seconds_to_deadline
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
Definition: test/core/util/test_config.cc:81
run_interop_tests.timeout_seconds
timeout_seconds
Definition: run_interop_tests.py:1553
gpr_free
GPRAPI void gpr_free(void *ptr)
Definition: alloc.cc:51
gpr_malloc
GPRAPI void * gpr_malloc(size_t size)
Definition: alloc.cc:29
cq_verifier_get_first_expectation
expectation * cq_verifier_get_first_expectation(cq_verifier *v)
Definition: cq_verifier_native.cc:43
setup.v
v
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:42
grpc_event
Definition: grpc_types.h:564
grpc_completion_queue
Definition: completion_queue.cc:347
cq_verifier::first_expectation
expectation * first_expectation
Definition: cq_verifier_native.cc:28
cq_verifier::cq
grpc_completion_queue * cq
Definition: cq_verifier.cc:78
cq_verifier
Definition: cq_verifier.cc:76
cq_verifier_destroy
void cq_verifier_destroy(cq_verifier *v)
Definition: cq_verifier_native.cc:38
alloc.h
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Definition: completion_queue.cc:1133
cq_verify
void cq_verify(cq_verifier *v, int timeout_sec)
Definition: cq_verifier.cc:268
cq_verifier_create
cq_verifier * cq_verifier_create(grpc_completion_queue *cq)
Definition: cq_verifier_native.cc:31
cq_verifier_next_event
grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds)
Definition: cq_verifier_native.cc:51
gpr_timespec
Definition: gpr_types.h:50
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
expectation
struct expectation expectation
Definition: cq_verifier_internal.h:24


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:06