Skip to content

Commit

Permalink
[Chttp2ServerListener] Fix flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
yashykt committed Jan 22, 2025
1 parent c1bcb5d commit 3f8625e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/core/transport/chttp2/chttp2_server_listener_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ class Chttp2ServerListenerTest : public ::testing::Test {
void TearDown() override {
CqVerifier cqv(cq_);
grpc_server_shutdown_and_notify(server_->c_ptr(), cq_, CqVerifier::tag(-1));
// In some cases, the server has a lingering connection with an established
// transport. In such cases, server shutdown results in the start of
// graceful GOAWAYs which can take a long time for a non-responsive client.
// grpc_server_cancel_all_calls results in immediate disconnection.
grpc_server_cancel_all_calls(server_->c_ptr());
cqv.Expect(CqVerifier::tag(-1), true);
cqv.Verify();
server_.reset();
Expand Down

0 comments on commit 3f8625e

Please sign in to comment.