diff options
author | Mark D. Roth <roth@google.com> | 2018-06-13 14:49:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 14:49:25 -0700 |
commit | 0159026111b4dac15ddd228baee3757554898235 (patch) | |
tree | ee14b853ed3196219b1a2b13b18cf0b5c929f73d /test | |
parent | 057fd3f57515e373ca4d220f48d1550c45eb7709 (diff) |
Revert "Second attempt: move recv_trailing_metadata into its own callback, don't use on_complete for recv_ops"
Diffstat (limited to 'test')
-rw-r--r-- | test/core/gprpp/inlined_vector_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_call_create.cc | 24 |
2 files changed, 8 insertions, 18 deletions
diff --git a/test/core/gprpp/inlined_vector_test.cc b/test/core/gprpp/inlined_vector_test.cc index 41f4338f8a..ae34947718 100644 --- a/test/core/gprpp/inlined_vector_test.cc +++ b/test/core/gprpp/inlined_vector_test.cc @@ -27,12 +27,10 @@ namespace testing { TEST(InlinedVectorTest, CreateAndIterate) { const int kNumElements = 9; InlinedVector<int, 2> v; - EXPECT_TRUE(v.empty()); for (int i = 0; i < kNumElements; ++i) { v.push_back(i); } EXPECT_EQ(static_cast<size_t>(kNumElements), v.size()); - EXPECT_FALSE(v.empty()); for (int i = 0; i < kNumElements; ++i) { EXPECT_EQ(i, v[i]); EXPECT_EQ(i, &v[i] - &v[0]); // Ensure contiguous allocation. diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index dd1610dc3d..831b29c506 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -621,26 +621,18 @@ typedef struct { static void StartTransportStreamOp(grpc_call_element* elem, grpc_transport_stream_op_batch* op) { call_data* calld = static_cast<call_data*>(elem->call_data); - // Construct list of closures to return. - grpc_core::CallCombinerClosureList closures; if (op->recv_initial_metadata) { - closures.Add(op->payload->recv_initial_metadata.recv_initial_metadata_ready, - GRPC_ERROR_NONE, "recv_initial_metadata"); + GRPC_CALL_COMBINER_START( + calld->call_combiner, + op->payload->recv_initial_metadata.recv_initial_metadata_ready, + GRPC_ERROR_NONE, "recv_initial_metadata"); } if (op->recv_message) { - closures.Add(op->payload->recv_message.recv_message_ready, GRPC_ERROR_NONE, - "recv_message"); + GRPC_CALL_COMBINER_START(calld->call_combiner, + op->payload->recv_message.recv_message_ready, + GRPC_ERROR_NONE, "recv_message"); } - if (op->recv_trailing_metadata) { - closures.Add( - op->payload->recv_trailing_metadata.recv_trailing_metadata_ready, - GRPC_ERROR_NONE, "recv_trailing_metadata"); - } - if (op->on_complete != nullptr) { - closures.Add(op->on_complete, GRPC_ERROR_NONE, "on_complete"); - } - // Execute closures. - closures.RunClosures(calld->call_combiner); + GRPC_CLOSURE_SCHED(op->on_complete, GRPC_ERROR_NONE); } static void StartTransportOp(grpc_channel_element* elem, |