diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-04 14:53:51 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-04 14:53:51 -0700 |
commit | 64be9f7a30a4bcb9ce3647f11ba9e06994aa3bb7 (patch) | |
tree | 42a4af35a2fe0f3a79573ff37130fd6b74c55cb9 /test/core/end2end/tests/registered_call.c | |
parent | c112d146a2dcc5e90d5f5cca10f55f212f9492c6 (diff) |
C Core API cleanup.
Simplify grpc_event into something that can be non-heap allocated.
Deprecate grpc_event_finish.
Remove grpc_op_error - use an int as this is more idiomatic C style.
Diffstat (limited to 'test/core/end2end/tests/registered_call.c')
-rw-r--r-- | test/core/end2end/tests/registered_call.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c index 05b7a1dad0..3ffcf00978 100644 --- a/test/core/end2end/tests/registered_call.c +++ b/test/core/end2end/tests/registered_call.c @@ -69,14 +69,10 @@ static gpr_timespec n_seconds_time(int n) { static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } static void drain_cq(grpc_completion_queue *cq) { - grpc_event *ev; - grpc_completion_type type; + grpc_event ev; do { ev = grpc_completion_queue_next(cq, five_seconds_time()); - GPR_ASSERT(ev); - type = ev->type; - grpc_event_finish(ev); - } while (type != GRPC_QUEUE_SHUTDOWN); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); } static void shutdown_server(grpc_end2end_test_fixture *f) { @@ -150,7 +146,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) { &call_details, &request_metadata_recv, f.server_cq, tag(101))); - cq_expect_completion(v_server, tag(101), GRPC_OP_OK); + cq_expect_completion(v_server, tag(101), 1); cq_verify(v_server); op = ops; @@ -167,10 +163,10 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) { op++; GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); - cq_expect_completion(v_server, tag(102), GRPC_OP_OK); + cq_expect_completion(v_server, tag(102), 1); cq_verify(v_server); - cq_expect_completion(v_client, tag(1), GRPC_OP_OK); + cq_expect_completion(v_client, tag(1), 1); cq_verify(v_client); GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); |