From 68f6b9ead2864688e9212390588bc68c9f03e38c Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 9 Dec 2015 15:37:46 -0800 Subject: [PATCH] separate recv intial metadata and trailing metadata --- test/core/surface/lame_client_test.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c index 9d08ff36f08..fd57dd02f91 100644 --- a/test/core/surface/lame_client_test.c +++ b/test/core/surface/lame_client_test.c @@ -84,6 +84,14 @@ int main(int argc, char **argv) { op->flags = 0; op->reserved = NULL; op++; + error = grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + /* the call should immediately fail */ + cq_expect_completion(cqv, tag(1), 0); + cq_verify(cqv); + + op = ops; op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; op->data.recv_status_on_client.status = &status; @@ -92,11 +100,11 @@ int main(int argc, char **argv) { op->flags = 0; op->reserved = NULL; op++; - error = grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(1), NULL); + error = grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(2), NULL); GPR_ASSERT(GRPC_CALL_OK == error); /* the call should immediately fail */ - cq_expect_completion(cqv, tag(1), 1); + cq_expect_completion(cqv, tag(2), 1); cq_verify(cqv); peer = grpc_call_get_peer(call);