proxygen
NoFlushUpstreamSessionTest Class Reference
Inheritance diagram for NoFlushUpstreamSessionTest:
HTTPUpstreamTest< SPDY3CodecPair > testing::Test

Public Member Functions

void onWriteChain (folly::AsyncTransportWrapper::WriteCallback *callback, std::shared_ptr< IOBuf >, WriteFlags) override
 
 ~NoFlushUpstreamSessionTest () override
 
- Public Member Functions inherited from HTTPUpstreamTest< SPDY3CodecPair >
 HTTPUpstreamTest (std::vector< int64_t > flowControl={-1,-1,-1})
 
void resumeWrites ()
 
virtual void onWriteChain (folly::AsyncTransportWrapper::WriteCallback *callback, std::shared_ptr< IOBuf > iob, WriteFlags)
 
void handleWrite (folly::AsyncTransportWrapper::WriteCallback *callback)
 
void SetUp () override
 
void commonSetUp (unique_ptr< HTTPCodec > codec)
 
unique_ptr< typename SPDY3CodecPair::CodecmakeServerCodec ()
 
void enableExHeader (typename SPDY3CodecPair::Codec *serverCodec)
 
void parseOutput (HTTPCodec &serverCodec)
 
void readAndLoop (const std::string &input)
 
void readAndLoop (IOBuf *buf)
 
void readAndLoop (const uint8_t *input, size_t length)
 
void testBasicRequest ()
 
void testBasicRequestHttp10 (bool keepalive)
 
void onCreate (const HTTPSessionBase &) override
 
void onDestroy (const HTTPSessionBase &) override
 
void onSettingsOutgoingStreamsFull (const HTTPSessionBase &) override
 
void onSettingsOutgoingStreamsNotFull (const HTTPSessionBase &) override
 
void TearDown () override
 
std::unique_ptr< StrictMock< MockHTTPHandler > > openTransaction (bool expectStartPaused=false)
 
std::unique_ptr< NiceMock< MockHTTPHandler > > openNiceTransaction (bool expectStartPaused=false)
 
void testSimpleUpgrade (const std::string &upgradeReqHeader, const std::string &upgradeRespHeader, CodecProtocol respCodecVersion)
 
MockByteEventTrackersetMockByteEventTracker ()
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 

Private Attributes

uint32_t timesCalled_ {0}
 
std::vector< folly::AsyncTransportWrapper::WriteCallback * > cbs_
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
 Test ()
 
 Test ()
 
- Protected Attributes inherited from HTTPUpstreamTest< SPDY3CodecPair >
bool sessionCreated_
 
bool sessionDestroyed_
 
bool transactionsFull_
 
bool transportGood_
 
EventBase eventBase_
 
EventBaseeventBasePtr_
 
MockAsyncTransporttransport_
 
folly::AsyncTransportWrapper::ReadCallbackreadCallback_
 
folly::AsyncTransport::ReplaySafetyCallbackreplaySafetyCallback_
 
folly::HHWheelTimer::UniquePtr transactionTimeouts_
 
std::vector< int64_tflowControl_
 
wangle::TransportInfo mockTransportInfo_
 
SocketAddress localAddr_
 
SocketAddress peerAddr_
 
HTTPUpstreamSessionhttpSession_
 
IOBufQueue writes_
 
std::vector< folly::AsyncTransportWrapper::WriteCallback * > cbs_
 
bool failWrites_
 
bool pauseWrites_
 
bool writeInLoop_
 

Detailed Description

Definition at line 1666 of file HTTPUpstreamSessionTest.cpp.

Constructor & Destructor Documentation

NoFlushUpstreamSessionTest::~NoFlushUpstreamSessionTest ( )
inlineoverride

Definition at line 1679 of file HTTPUpstreamSessionTest.cpp.

References folly::AsyncSocketException::UNKNOWN.

1679  {
1681  for (auto& cb : cbs_) {
1682  cb->writeErr(0, ex);
1683  }
1684  }
string UNKNOWN
Definition: tokenize.py:53
std::vector< folly::AsyncTransportWrapper::WriteCallback * > cbs_

Member Function Documentation

void NoFlushUpstreamSessionTest::onWriteChain ( folly::AsyncTransportWrapper::WriteCallback callback,
std::shared_ptr< IOBuf ,
WriteFlags   
)
inlineoverride

Definition at line 1668 of file HTTPUpstreamSessionTest.cpp.

References folly::AsyncWriter::WriteCallback::writeSuccess().

1670  {
1671  if (!timesCalled_++) {
1672  callback->writeSuccess();
1673  } else {
1674  cbs_.push_back(callback);
1675  }
1676  // do nothing -- let unacked egress build up
1677  }
virtual void writeSuccess() noexcept=0
std::vector< folly::AsyncTransportWrapper::WriteCallback * > cbs_

Member Data Documentation

std::vector<folly::AsyncTransportWrapper::WriteCallback*> NoFlushUpstreamSessionTest::cbs_
private

Definition at line 1687 of file HTTPUpstreamSessionTest.cpp.

uint32_t NoFlushUpstreamSessionTest::timesCalled_ {0}
private

Definition at line 1686 of file HTTPUpstreamSessionTest.cpp.


The documentation for this class was generated from the following file: