TEST_F(GrpcHealthCheckerImplTest, GoAwayErrorProbeInProgress) {
  // FailureType::Network will be issued, it will render host unhealthy only if unhealthy_threshold
  // is reached.
  setupHCWithUnhealthyThreshold(1);
  expectSingleHealthcheck(HealthTransition::Changed);
  EXPECT_CALL(event_logger_, logEjectUnhealthy(_, _, _));
  EXPECT_CALL(event_logger_, logUnhealthy(_, _, _, true));

  // GOAWAY with non-NO_ERROR code will result in a healthcheck failure
  // and the connection closing.
  test_sessions_[0]->codec_client_->raiseGoAway(Http::GoAwayErrorCode::Other);

  EXPECT_TRUE(cluster_->prioritySet().getMockHostSet(0)->hosts_[0]->healthFlagGet(
      Host::HealthFlag::FAILED_ACTIVE_HC));
  EXPECT_EQ(Host::Health::Unhealthy,
            cluster_->prioritySet().getMockHostSet(0)->hosts_[0]->health());
}
TEST_F(GrpcHealthCheckerImplTest, GoAwayErrorProbeInProgress) {
   
   
  setupHCWithUnhealthyThreshold(1);
  expectSingleHealthcheck(HealthTransition::Changed);
  EXPECT_CALL(event_logger_, logEjectUnhealthy(_, _, _));
  EXPECT_CALL(event_logger_, logUnhealthy(_, _, _, true));

   
   
  test_sessions_[0]->codec_client_->raiseGoAway(Http::GoAwayErrorCode::Other);

  EXPECT_TRUE(cluster_->prioritySet().getMockHostSet(0)->hosts_[0]->healthFlagGet(
      Host::HealthFlag::FAILED_ACTIVE_HC));
  EXPECT_EQ(Host::Health::Unhealthy,
            cluster_->prioritySet().getMockHostSet(0)->hosts_[0]->health());
}