Merge pull request #19069 from yang-g/test_tcp_server

Add an early flush so that the shutdown callback does not have to wait for deadline expiration
reviewable/pr18917/r3^2
Yang Gao 6 years ago committed by GitHub
commit c9bd2adb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      test/core/util/test_tcp_server.cc

@ -102,6 +102,7 @@ void test_tcp_server_destroy(test_tcp_server* server) {
grpc_schedule_on_exec_ctx);
shutdown_deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
gpr_time_from_seconds(5, GPR_TIMESPAN));
grpc_core::ExecCtx::Get()->Flush();
while (!server->shutdown &&
gpr_time_cmp(gpr_now(GPR_CLOCK_MONOTONIC), shutdown_deadline) < 0) {
test_tcp_server_poll(server, 1000);

Loading…
Cancel
Save