aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/request_with_payload.c
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-05-18 09:20:43 -0700
committerGravatar vjpai <vpai@google.com>2015-05-18 09:20:43 -0700
commitccced5389de0258b9f1d37681efcb8be57a6ef10 (patch)
tree86eb0674d00268e333a7294c9a45bc49541e6d1e /test/core/end2end/tests/request_with_payload.c
parent6a608020b0e10f258d64f7b2a5b5cc02643ed9bc (diff)
parentcc1c37c3e5aa7dc5e0da761e1bff0fe8e1fbaaee (diff)
Merge branch 'master' into poisson
Conflicts: Makefile
Diffstat (limited to 'test/core/end2end/tests/request_with_payload.c')
-rw-r--r--test/core/end2end/tests/request_with_payload.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index fea71b4193..bba50b3113 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -66,14 +66,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) {
@@ -153,11 +149,11 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1)));
- GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(f.server, &s,
- &call_details,
- &request_metadata_recv,
- f.server_cq, tag(101)));
- cq_expect_completion(v_server, tag(101), GRPC_OP_OK);
+ GPR_ASSERT(GRPC_CALL_OK ==
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.server_cq,
+ f.server_cq, tag(101)));
+ cq_expect_completion(v_server, tag(101), 1);
cq_verify(v_server);
op = ops;
@@ -177,10 +173,10 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
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_OK);