proxygen
|
Public Member Functions | |
HTTPDownstreamTest (std::vector< int64_t > flowControl={-1,-1,-1}, bool startImmediately=true) | |
HTTPCodec::StreamID | sendRequest (const std::string &url="/", int8_t priority=0, bool eom=true) |
HTTPCodec::StreamID | sendRequest (const HTTPMessage &req, bool eom=true) |
HTTPCodec::StreamID | sendHeader () |
Promise< Unit > | sendRequestLater (HTTPMessage req, bool eof=false) |
void | SetUp () override |
void | cleanup () |
std::unique_ptr< testing::StrictMock< MockHTTPHandler > > | addSimpleStrictHandler () |
std::unique_ptr< testing::NiceMock< MockHTTPHandler > > | addSimpleNiceHandler () |
void | onEOMTerminateHandlerExpectShutdown (MockHTTPHandler &handler) |
void | expectDetachSession () |
void | addSingleByteReads (const char *data, milliseconds delay={}) |
void | flushRequestsAndLoop (bool eof=false, milliseconds eofDelay=milliseconds(0), milliseconds initialDelay=milliseconds(0), std::function< void()> extraEventsFn=std::function< void()>()) |
void | flushRequestsAndLoopN (uint64_t n, bool eof=false, milliseconds eofDelay=milliseconds(0), milliseconds initialDelay=milliseconds(0), std::function< void()> extraEventsFn=std::function< void()>()) |
void | flushRequests (bool eof=false, milliseconds eofDelay=milliseconds(0), milliseconds initialDelay=milliseconds(0), std::function< void()> extraEventsFn=std::function< void()>()) |
void | testSimpleUpgrade (const std::string &upgradeHeader, CodecProtocol expectedProtocol, const std::string &expectedUpgradeHeader) |
void | gracefulShutdown () |
void | testPriorities (uint32_t numPriorities) |
void | testChunks (bool trailers) |
void | expect101 (CodecProtocol expectedProtocol, const std::string &expectedUpgrade, bool expect100=false) |
void | expectResponse (uint32_t code=200, ErrorCode errorCode=ErrorCode::NO_ERROR, bool expect100=false, bool expectGoaway=false) |
void | expectResponses (uint32_t n, uint32_t code=200, ErrorCode errorCode=ErrorCode::NO_ERROR, bool expect100=false, bool expectGoaway=false) |
void | parseOutput (HTTPCodec &clientCodec) |
void | resumeWritesInLoop () |
void | resumeWritesAfterDelay (milliseconds delay) |
MockByteEventTracker * | setMockByteEventTracker () |
Public Member Functions inherited from testing::Test | |
virtual | ~Test () |
virtual | ~Test () |
virtual | ~Test () |
Protected Attributes | |
EventBase | eventBase_ |
TestAsyncTransport * | transport_ |
folly::HHWheelTimer::UniquePtr | transactionTimeouts_ |
std::vector< int64_t > | flowControl_ |
StrictMock< MockController > | mockController_ |
HTTPDownstreamSession * | httpSession_ |
IOBufQueue | requests_ {IOBufQueue::cacheChainLength()} |
unique_ptr< HTTPCodec > | clientCodec_ |
NiceMock< MockHTTPCodecCallback > | callbacks_ |
IOBufQueue | parseOutputStream_ {IOBufQueue::cacheChainLength()} |
bool | breakParseOutput_ {false} |
C::Codec * | rawCodec_ {nullptr} |
HeaderIndexingStrategy | testH2IndexingStrat_ |
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 () | |
virtual void | TearDown () |
Test () | |
virtual void | TearDown () |
Test () | |
virtual void | TearDown () |
Definition at line 44 of file HTTPDownstreamSessionTest.cpp.
|
inlineexplicit |
Definition at line 46 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 173 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 155 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 199 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 148 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 253 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 195 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 293 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 298 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 223 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 205 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 213 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 242 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 189 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 368 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 394 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 390 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 126 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 111 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 120 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 130 of file HTTPDownstreamSessionTest.cpp.
|
inline |
Definition at line 399 of file HTTPDownstreamSessionTest.cpp.
|
inlineoverridevirtual |
void HTTPDownstreamTest< C >::testChunks | ( | bool | trailers | ) |
Definition at line 1365 of file HTTPDownstreamSessionTest.cpp.
References testing::_, EXPECT_CALL, g(), handler(), and i.
void HTTPDownstreamTest< C >::testPriorities | ( | uint32_t | numPriorities | ) |
Definition at line 2170 of file HTTPDownstreamSessionTest.cpp.
References testing::_, EXPECT_CALL, EXPECT_EQ, EXPECT_GE, EXPECT_LE, handler(), i, testing::Invoke(), folly::gen::move, and uint32_t.
void HTTPDownstreamTest< C >::testSimpleUpgrade | ( | const std::string & | upgradeHeader, |
CodecProtocol | expectedProtocol, | ||
const std::string & | expectedUpgradeHeader | ||
) |
Definition at line 1864 of file HTTPDownstreamSessionTest.cpp.
References ASSERT_NE, codec, EXPECT_CALL, EXPECT_EQ, EXPECT_FALSE, proxygen::HTTP2Codec::getHeaderIndexingStrategy(), proxygen::getUpgradeRequest(), handler(), proxygen::http2::kProtocolCleartextString, and testing::Return().
|
protected |
Definition at line 430 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 428 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 427 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 420 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 423 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 425 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 424 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 429 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 431 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 426 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 432 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 422 of file HTTPDownstreamSessionTest.cpp.
|
protected |
Definition at line 421 of file HTTPDownstreamSessionTest.cpp.