aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c')
-rw-r--r--test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
index e1126c6213..c07ec9a311 100644
--- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
@@ -109,7 +109,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_metadata meta_c[2] = {{"key1", "val1", 4, {{NULL, NULL, NULL}}}, {"key2", "val2", 4, {{NULL, NULL, NULL}}}};
grpc_metadata meta_s[2] = {{"key3", "val3", 4, {{NULL, NULL, NULL}}}, {"key4", "val4", 4, {{NULL, NULL, NULL}}}};
grpc_metadata meta_t[2] = {{"key5", "val5", 4, {{NULL, NULL, NULL}}}, {"key6", "val6", 4, {{NULL, NULL, NULL}}}};
- grpc_end2end_test_fixture f = begin_test(config, __FUNCTION__, NULL, NULL);
+ grpc_end2end_test_fixture f = begin_test(config, "test_request_response_with_metadata_and_payload", NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op *op;
@@ -170,6 +170,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++;
@@ -179,13 +191,7 @@ 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(cqv, tag(102), 1);
cq_expect_completion(cqv, tag(1), 1);