From a13a8c0f3ea9bdf70680c0c8b5667186c832a412 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 21 Nov 2017 19:38:09 -0800 Subject: A few src/core fixes due to missing exec_ctx_finish --- test/core/bad_client/bad_client.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/core/bad_client') diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index 313c43f9b3..267933ff62 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -135,6 +135,7 @@ void grpc_run_bad_client_test( /* Write data */ grpc_endpoint_write(sfd.client, &outgoing, &done_write_closure); + grpc_core::ExecCtx::Get()->Flush(); /* Await completion, unless the request is large and write may not finish * before the peer shuts down. */ @@ -147,7 +148,7 @@ void grpc_run_bad_client_test( grpc_endpoint_shutdown( sfd.client, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Forced Disconnect")); grpc_endpoint_destroy(sfd.client); - + grpc_core::ExecCtx::Get()->Flush(); sfd.client = nullptr; } @@ -167,7 +168,7 @@ void grpc_run_bad_client_test( GRPC_CLOSURE_INIT(&read_done_closure, read_done, &read_done_event, grpc_schedule_on_exec_ctx); grpc_endpoint_read(sfd.client, &incoming, &read_done_closure); - + grpc_core::ExecCtx::Get()->Flush(); do { GPR_ASSERT(gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0); GPR_ASSERT( @@ -186,6 +187,7 @@ void grpc_run_bad_client_test( grpc_endpoint_shutdown( sfd.client, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Test Shutdown")); grpc_endpoint_destroy(sfd.client); + grpc_core::ExecCtx::Get()->Flush(); } GPR_ASSERT( -- cgit v1.2.3