16 using namespace folly;
21 using RequestHandlerAdaptor::RequestHandlerAdaptor;
31 bool headersSent_{
false};
36 EXPECT_CALL(requestHandler_, canHandleExpect()).WillOnce(
39 auto adaptor = std::make_shared<StubRequestHandlerAdaptor>(&requestHandler_);
40 auto msg = std::make_unique<HTTPMessage>();
41 msg->getHeaders().add(
"Expect",
"100-continue");
44 EXPECT_EQ(adaptor->headersSent_, !handlerResponds);
52 TEST(RequestHandlerAdaptorTest, onError) {
58 1, 1, transport, egressQueue);
61 HTTPException ex(HTTPException::Direction::EGRESS,
"egress timeout");
void sendEOM() noexceptoverride
virtual void setHandler(Handler *handler)
void onError(const HTTPException &error)
#define EXPECT_EQ(val1, val2)
void testExpectHandling(bool handlerResponds)
constexpr detail::Map< Move > move
void setProxygenError(ProxygenError proxygenError)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
void Expect(bool condition, const char *file, int line, const string &msg)
void sendHeaders(HTTPMessage &) noexceptoverride
virtual void onHeadersComplete(std::unique_ptr< HTTPMessage > msg) noexcept=0
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
TEST(SequencedExecutor, CPUThreadPoolExecutor)
internal::ReturnAction< R > Return(R value)