diff options
author | 2015-05-19 16:26:33 -0700 | |
---|---|---|
committer | 2015-05-19 16:26:33 -0700 | |
commit | 4541f335697f6b266cb4c88b5d390b5a2ef9a1b5 (patch) | |
tree | 2c84ecf78cd26d09bd1a881ee414ca94d6d3b1c5 /test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c | |
parent | c259988357f3722b9d0ee7b55bcb818425d15ece (diff) |
Fix tests: stage server sends so that we dont inadvertently abbreviate streams
Diffstat (limited to 'test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c')
-rw-r--r-- | test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c index 709dc47b72..868b5f078b 100644 --- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c @@ -188,6 +188,18 @@ static void test_request_response_with_metadata_and_payload( op->data.send_initial_metadata.count = 2; op->data.send_initial_metadata.metadata = meta_s; op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op++; + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + + cq_expect_completion(v_server, tag(102), 1); + cq_verify(v_server); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; op++; @@ -196,15 +208,9 @@ static void test_request_response_with_metadata_and_payload( op->data.send_status_from_server.status = GRPC_STATUS_OK; op->data.send_status_from_server.status_details = "xyz"; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op++; - GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102))); + GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(103))); - cq_expect_completion(v_server, tag(102), 1); + cq_expect_completion(v_server, tag(103), 1); cq_verify(v_server); cq_expect_completion(v_client, tag(1), 1); |