9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 15 using namespace folly;
22 class MockServerStateMachineInstance :
public MockServerStateMachine {
56 context_ = std::make_shared<FizzServerContext>();
63 *MockServerStateMachineInstance::instance, _processAccept(
_,
_,
_,
_))
65 fizzServer_->fizzServer_.accept(&
evb_, context_);
70 std::unique_ptr<TestFizzServer, DelayedDestruction::Destructor>
fizzServer_;
80 "808c0103010063000000200000390000380000350000";
85 context_->setVersionFallbackEnabled(
true);
89 fizzServer_->fizzServer_.newTransportData();
93 context_->setVersionFallbackEnabled(
false);
97 *MockServerStateMachineInstance::instance, _processSocketData(
_,
_))
99 fizzServer_->fizzServer_.waitForData();
102 fizzServer_->fizzServer_.newTransportData();
106 context_->setVersionFallbackEnabled(
true);
110 *MockServerStateMachineInstance::instance, _processSocketData(
_,
_))
112 fizzServer_->fizzServer_.waitForData();
115 fizzServer_->fizzServer_.newTransportData();
119 context_->setVersionFallbackEnabled(
true);
123 *MockServerStateMachineInstance::instance, _processSocketData(
_,
_))
125 fizzServer_->fizzServer_.waitForData();
128 fizzServer_->fizzServer_.newTransportData();
129 fizzServer_->queue_.clear();
132 *MockServerStateMachineInstance::instance, _processSocketData(
_,
_))
134 fizzServer_->fizzServer_.waitForData();
137 fizzServer_->fizzServer_.newTransportData();
bool unhexlify(const InputString &input, OutputString &output)
boost::variant< Actions, folly::Future< Actions >> AsyncActions
—— Concurrent Priority Queue Implementation ——
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
std::unique_ptr< TestFizzServer, DelayedDestruction::Destructor > fizzServer_
FizzServer< ActionMoveVisitor, MockServerStateMachineInstance > fizzServer_
void operator()(AttemptVersionFallback &)
std::vector< Action > Actions
TEST_F(AsyncSSLSocketWriteTest, write_coalescing1)
ActionMoveVisitor visitor_
static std::unique_ptr< IOBuf > getV2ClientHello()
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
MockServerStateMachineInstance()
std::shared_ptr< FizzServerContext > context_
#define MOCK_METHOD0(m,...)
NetworkSocket accept(NetworkSocket s, sockaddr *addr, socklen_t *addrlen)