diff options
Diffstat (limited to 'test/core/end2end/tests/write_buffering.cc')
-rw-r--r-- | test/core/end2end/tests/write_buffering.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/test/core/end2end/tests/write_buffering.cc b/test/core/end2end/tests/write_buffering.cc index 7f3d1abc39..5d76d238b9 100644 --- a/test/core/end2end/tests/write_buffering.cc +++ b/test/core/end2end/tests/write_buffering.cc @@ -128,7 +128,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; - error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(1), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); memset(ops, 0, sizeof(ops)); @@ -138,7 +139,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->flags = 0; op->reserved = nullptr; op++; - error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(2), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( @@ -154,7 +156,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->data.send_message.send_message = request_payload1; op->flags = GRPC_WRITE_BUFFER_HINT; op++; - error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), nullptr); + error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(3), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); memset(ops, 0, sizeof(ops)); @@ -162,7 +165,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(102), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); /* recv message should not succeed yet - it's buffered at the client still */ @@ -171,7 +175,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message.recv_message = &request_payload_recv1; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr); + error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(103), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); CQ_EXPECT_COMPLETION(cqv, tag(2), true); @@ -186,7 +191,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->data.send_message.send_message = request_payload2; op->flags = 0; op++; - error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), nullptr); + error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(4), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); /* now the first send should match up with the first recv */ @@ -200,7 +206,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message.recv_message = &request_payload_recv2; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr); + error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(104), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); CQ_EXPECT_COMPLETION(cqv, tag(104), true); @@ -219,7 +226,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->flags = 0; op->reserved = nullptr; op++; - error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), nullptr); + error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(4), + nullptr); memset(ops, 0, sizeof(ops)); op = ops; @@ -236,7 +244,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { op->flags = 0; op->reserved = nullptr; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(105), nullptr); + error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(105), + nullptr); GPR_ASSERT(GRPC_CALL_OK == error); CQ_EXPECT_COMPLETION(cqv, tag(105), 1); |