proxygen/lib/http/session/test/HQUpstreamSessionTest.cpp
TEST_P(HQUpstreamSessionTestH1qv2HQ, ExtraSettings) {
  auto handler = openTransaction();
  handler->txn_->sendHeaders(getGetRequest());
  handler->txn_->sendEOM();
  handler->expectError();
  handler->expectDetachTransaction();

  // Need to use a new codec. Since generating settings twice is
  // forbidden
  HQControlCodec auxControlCodec_{nextUnidirectionalStreamId_,
                                  TransportDirection::DOWNSTREAM,
                                  StreamDirection::EGRESS,
                                  egressSettings_,
                                  UnidirectionalStreamType::H1Q_CONTROL};
  folly::IOBufQueue writeBuf{folly::IOBufQueue::cacheChainLength()};
  auxControlCodec_.generateSettings(writeBuf);
  socketDriver_->addReadEvent(
      connControlStreamId_, writeBuf.move(), milliseconds(0));

  flushAndLoop();

  EXPECT_EQ(*socketDriver_->streams_[kConnectionStreamId].error,
            HTTP3::ErrorCode::HTTP_UNEXPECTED_FRAME);
}
// This test is checking two different scenarios for different protocol
//   - in HQ we already have sent SETTINGS in SetUp, so tests that multiple
//     setting frames are not allowed
//   - in h1q-fb-v2 tests that receiving even a single SETTINGS frame errors
//     out the connection
This test is checking two different scenarios for different protocol
in HQ we already have sent SETTINGS in SetUp, so tests that multiple
setting frames are not allowed
in h1q-fb-v2 tests that receiving even a single SETTINGS frame errors
out the connection
This test is checking two different scenarios for different protocol in HQ we already have sent SETTINGS in SetUp so tests that multiple setting frames are not allowed in h1q - fb - v2 tests that receiving even a single SETTINGS frame errors out the connection
TEST_P(HQUpstreamSessionTestH1qv2HQ, ExtraSettings) {
  auto handler = openTransaction();
  handler->txn_->sendHeaders(getGetRequest());
  handler->txn_->sendEOM();
  handler->expectError();
  handler->expectDetachTransaction();
  HQControlCodec auxControlCodec_{nextUnidirectionalStreamId_,
                                  TransportDirection::DOWNSTREAM,
                                  StreamDirection::EGRESS,
                                  egressSettings_,
                                  UnidirectionalStreamType::H1Q_CONTROL};
  folly::IOBufQueue writeBuf{folly::IOBufQueue::cacheChainLength()};
  auxControlCodec_.generateSettings(writeBuf);
  socketDriver_->addReadEvent(
      connControlStreamId_, writeBuf.move(), milliseconds(0));
  flushAndLoop();
  EXPECT_EQ(*socketDriver_->streams_[kConnectionStreamId].error,
            HTTP3::ErrorCode::HTTP_UNEXPECTED_FRAME);
}
TEST_P ( HQUpstreamSessionTestH1qv2HQ , ExtraSettings ) { auto handler = openTransaction ( ) ; handler -> txn_ -> sendHeaders ( getGetRequest ( ) ) ; handler -> txn_ -> sendEOM ( ) ; handler -> expectError ( ) ; handler -> expectDetachTransaction ( ) ; HQControlCodec auxControlCodec_ { nextUnidirectionalStreamId_ , TransportDirection :: DOWNSTREAM , StreamDirection :: EGRESS , egressSettings_ , UnidirectionalStreamType :: H1Q_CONTROL } ; folly :: IOBufQueue writeBuf { folly :: IOBufQueue :: cacheChainLength ( ) } ; auxControlCodec_ . generateSettings ( writeBuf ) ; socketDriver_ -> addReadEvent ( connControlStreamId_ , writeBuf . move ( ) , milliseconds ( 0 ) ) ; flushAndLoop ( ) ; EXPECT_EQ ( * socketDriver_ -> streams_ [ kConnectionStreamId ] . error , HTTP3 :: ErrorCode :: HTTP_UNEXPECTED_FRAME ) ; }
This test is checking two different scenarios for different protocol
 in HQ we already have sent SETTINGS in SetUp, so tests that multiple
setting frames are not allowed
 in h1q-fb-v2 tests that receiving even a single SETTINGS frame errors
out the connection
This test is checking two different scenarios for different protocol in HQ we already have sent SETTINGS in SetUp so tests that multiple setting frames are not allowed in h1q - fb - v2 tests that receiving even a single SETTINGS frame errors out the connection
// Need to use a new codec. Since generating settings twice is // forbidden