TEST_P(ConnectTerminationIntegrationTest, UpstreamClose) {
  initialize();

  setUpConnection();
  sendBidirectionalData();

  // Tear down by closing the upstream connection.
  ASSERT_TRUE(fake_raw_upstream_connection_->close());
  if (downstream_protocol_ == Http::CodecType::HTTP3) {
    // In HTTP/3 end stream will be sent when the upstream connection is closed, and
    // STOP_SENDING frame sent instead of reset.
    ASSERT_TRUE(response_->waitForEndStream());
  } else {
    ASSERT_TRUE(response_->waitForReset());
  }
}
TEST_P(ConnectTerminationIntegrationTest, UpstreamClose) {
  initialize();

  setUpConnection();
  sendBidirectionalData();

   
  ASSERT_TRUE(fake_raw_upstream_connection_->close());
  if (downstream_protocol_ == Http::CodecType::HTTP3) {
     
     
    ASSERT_TRUE(response_->waitForEndStream());
  } else {
    ASSERT_TRUE(response_->waitForReset());
  }
}