18 #if defined(__clang__) && __clang_major__ >= 3 && __clang_minor__ >= 6 19 #pragma clang diagnostic push 20 #pragma clang diagnostic ignored "-Winconsistent-missing-override" 41 bool eom,
bool trackLastByteFlushed)
noexcept override {
43 std::shared_ptr<folly::IOBuf>(iob.release()), eom, trackLastByteFlushed);
69 bool unidirectional));
74 ->getLocalAddressNonConst();
81 ->getPeerAddressNonConst();
88 ->getSetupTransportInfoNonConst();
139 bool useFlowControl =
false,
140 uint32_t receiveInitialWindowSize = 0,
150 receiveInitialWindowSize,
151 sendInitialWindowSize,
152 priority, assocStreamId, exAttributes),
153 defaultAddress_(
"127.0.0.1", 80) {
154 EXPECT_CALL(mockTransport_, getLocalAddressNonConst())
156 EXPECT_CALL(mockTransport_, getPeerAddressNonConst())
160 EXPECT_CALL(mockTransport_, getSetupTransportInfoNonConst())
166 this->setHandlerUnmocked(handler);
184 bool useFlowControl =
false,
185 uint32_t receiveInitialWindowSize = 0,
196 timeout.getWheelTimer(),
197 timeout.getDefaultTimeout(),
200 receiveInitialWindowSize,
201 sendInitialWindowSize,
217 timeout.getWheelTimer(),
218 timeout.getDefaultTimeout(),
240 sendBody(std::shared_ptr<folly::IOBuf>(iob.release()));
287 #if defined(__clang__) && __clang_major__ >= 3 && __clang_minor__ >= 6 288 #pragma clang diagnostic pop
virtual void setHandler(Handler *handler)
virtual void resumeIngress(HTTPTransaction *txn) noexcept=0
GMOCK_METHOD2_(, noexcept,, sendChunkHeader, size_t(HTTPTransaction *, size_t))
virtual bool getHTTP2PrioritiesEnabled() const =0
MockHTTPTransactionTransport()
virtual void sendHeaders(HTTPTransaction *txn, const HTTPMessage &headers, HTTPHeaderSize *size, bool eom) noexcept=0
const folly::SocketAddress & getLocalAddress() const noexceptoverride
virtual size_t sendChunkTerminator(HTTPTransaction *txn) noexcept=0
virtual bool isDraining() const =0
const wangle::TransportInfo & getSetupTransportInfo() const noexceptoverride
const HTTPCodec & getCodec() const noexceptoverride
MockHTTPTransaction(TransportDirection direction, HTTPCodec::StreamID id, uint32_t seqNo, const HTTP2PriorityQueue &egressQueue, const WheelTimerInstance &timeout, HTTPSessionStats *stats=nullptr, bool useFlowControl=false, uint32_t receiveInitialWindowSize=0, uint32_t sendInitialWindowSize=0, http2::PriorityUpdate priority=http2::DefaultPriority, folly::Optional< HTTPCodec::StreamID > assocStreamId=HTTPCodec::NoStream, folly::Optional< HTTPCodec::ExAttributes > exAttributes=HTTPCodec::NoExAttributes)
requires E e noexcept(noexcept(s.error(std::move(e))))
const folly::SocketAddress & getPeerAddress() const noexceptoverride
internal::ReturnRefAction< R > ReturnRef(R &x)
virtual HTTPTransaction * newExTransaction(HTTPTransaction::Handler *handler, HTTPCodec::StreamID controlStream, bool unidirectional) noexcept=0
virtual void detach(HTTPTransaction *txn) noexcept=0
MOCK_METHOD1(getCurrentTransportInfo, bool(wangle::TransportInfo *))
virtual void addWaitingForReplaySafety(folly::AsyncTransport::ReplaySafetyCallback *callback) noexcept=0
MOCK_CONST_METHOD0(isDraining, bool())
void handler(int, siginfo_t *, void *)
MockHTTPTransaction(TransportDirection direction, HTTPCodec::StreamID id, uint32_t seqNo, const HTTP2PriorityQueue &egressQueue, const WheelTimerInstance &timeout, folly::Optional< HTTPCodec::ExAttributes > exAttributes)
GMOCK_METHOD4_(, noexcept,, sendHeaders, void(HTTPTransaction *, const HTTPMessage &, HTTPHeaderSize *, bool))
void setHandlerUnmocked(HTTPTransactionHandler *handler)
virtual void notifyEgressBodyBuffered(int64_t bytes) noexcept=0
const folly::SocketAddress defaultAddress_
virtual bool needToBlockForReplaySafety() const =0
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
virtual size_t sendAbort(HTTPTransaction *txn, ErrorCode statusCode) noexcept=0
virtual std::string getSecurityProtocol() const =0
virtual size_t sendEOM(HTTPTransaction *txn, const HTTPHeaders *trailers) noexcept=0
virtual size_t sendWindowUpdate(HTTPTransaction *txn, uint32_t bytes) noexcept=0
virtual void describe(std::ostream &) const =0
virtual void pauseIngress(HTTPTransaction *txn) noexcept=0
void sendBody(std::unique_ptr< folly::IOBuf > iob) noexceptoverride
virtual bool isReplaySafe() const =0
GMOCK_METHOD0_(, noexcept,, notifyPendingEgress, void())
virtual void notifyIngressBodyProcessed(uint32_t bytes) noexcept=0
MockHTTPTransactionTransportCallback()
size_t sendBody(HTTPTransaction *txn, std::unique_ptr< folly::IOBuf > iob, bool eom, bool trackLastByteFlushed) noexceptoverride
virtual size_t sendChunkHeader(HTTPTransaction *txn, size_t length) noexcept=0
const PriorityUpdate DefaultPriority
MOCK_METHOD0(drain, void())
virtual void transactionTimeout(HTTPTransaction *txn) noexcept=0
GMOCK_METHOD3_(, noexcept,, newExTransaction, HTTPTransaction *(HTTPTransaction::Handler *handler, HTTPCodec::StreamID controlStream, bool unidirectional))
testing::NiceMock< MockHTTPTransactionTransport > mockTransport_
#define ON_CALL(obj, call)
virtual size_t sendPriority(HTTPTransaction *txn, const http2::PriorityUpdate &pri) noexcept=0
const folly::AsyncTransportWrapper * getUnderlyingTransport() const noexceptoverride
virtual void setHTTP2PrioritiesEnabled(bool enabled)=0
MockHTTPTransaction(TransportDirection direction, HTTPCodec::StreamID id, uint32_t seqNo, const HTTP2PriorityQueue &egressQueue, folly::HHWheelTimer *timer=nullptr, const folly::Optional< std::chrono::milliseconds > &transactionTimeout=folly::Optional< std::chrono::milliseconds >(), HTTPSessionStats *stats=nullptr, bool useFlowControl=false, uint32_t receiveInitialWindowSize=0, uint32_t sendInitialWindowSize=0, http2::PriorityUpdate priority=http2::DefaultPriority, folly::Optional< HTTPCodec::StreamID > assocStreamId=HTTPCodec::NoStream, folly::Optional< HTTPCodec::ExAttributes > exAttributes=HTTPCodec::NoExAttributes)
#define EXPECT_CALL(obj, call)
virtual folly::Optional< const HTTPMessage::HTTPPriority > getHTTPPriority(uint8_t level)=0
static const folly::Optional< StreamID > NoStream
const internal::AnythingMatcher _
virtual HTTPTransaction * newPushedTransaction(HTTPCodec::StreamID assocStreamId, HTTPTransaction::PushHandler *handler) noexcept=0
wangle::TransportInfo setupTransportInfo_
MOCK_CONST_METHOD1(describe, void(std::ostream &))
virtual bool getCurrentTransportInfo(wangle::TransportInfo *tinfo)=0
virtual void notifyPendingEgress() noexcept=0
virtual void removeWaitingForReplaySafety(folly::AsyncTransport::ReplaySafetyCallback *callback) noexcept=0
GMOCK_METHOD1_(, noexcept,, pauseIngress, void(HTTPTransaction *))
internal::ReturnAction< R > Return(R value)
static const folly::Optional< ExAttributes > NoExAttributes