21 using namespace folly;
36 broadcastHandler = std::make_unique<StrictMock<MockBroadcastHandler>>();
48 Mock::VerifyAndClear(broadcastHandler.get());
50 broadcastHandler.reset();
69 ctx->fireTransportActive();
75 broadcastHandler.get())));
80 ctx->fireTransportActive();
84 pipeline->transportActive();
92 observingHandler->onNext(1);
93 observingHandler->onNext(2);
99 observingHandler->onCompleted();
108 ctx->fireTransportActive();
115 make_exception_wrapper<std::exception>())));
120 pipeline->transportActive();
130 ctx->fireTransportActive();
139 pipeline->transportActive();
144 promise.
setValue(broadcastHandler.get());
154 ctx->fireTransportActive();
163 pipeline->transportActive();
175 ctx->fireTransportActive();
181 broadcastHandler.get())));
186 ctx->fireTransportActive();
190 pipeline->transportActive();
196 observingHandler->onNext(1);
202 observingHandler->onError(make_exception_wrapper<std::exception>());
210 ctx->fireTransportActive();
216 broadcastHandler.get())));
221 ctx->fireTransportActive();
225 pipeline->transportActive();
231 observingHandler->onNext(1);
239 EXPECT_CALL(*broadcastHandler, unsubscribe(
_)).Times(1);
242 observingHandler->readEOF(
nullptr);
250 ctx->fireTransportActive();
256 broadcastHandler.get())));
261 ctx->fireTransportActive();
265 pipeline->transportActive();
271 observingHandler->onNext(1);
279 EXPECT_CALL(*broadcastHandler, unsubscribe(
_)).Times(1);
282 observingHandler->readException(
nullptr,
283 make_exception_wrapper<std::exception>());
291 ctx->fireTransportActive();
297 broadcastHandler.get())));
302 ctx->fireTransportActive();
306 pipeline->transportActive();
318 EXPECT_CALL(*broadcastHandler, unsubscribe(
_)).Times(1);
321 observingHandler->onNext(1);
331 ctx->fireTransportActive();
337 broadcastHandler.get())));
342 ctx->fireTransportActive();
346 pipeline->transportActive();
353 observingHandler->onNext(1);
356 EXPECT_CALL(*broadcastHandler, unsubscribe(
_)).Times(1);
ObservingPipeline< int >::Ptr pipeline
StrictMock< MockBroadcastPool > pool
void subscribe(uint32_t iters, int N)
std::unique_ptr< IOBuf > encode(int &data) override
void setException(exception_wrapper ew)
—— Concurrent Priority Queue Implementation ——
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
MoveWrapper< T0 > makeMoveWrapper(T &&t)
std::enable_if< std::is_same< Unit, B >::value, void >::type setValue()
std::unique_ptr< StrictMock< MockBroadcastHandler > > broadcastHandler
std::shared_ptr< Pipeline > Ptr
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
Handler< R, R, W, W >::Context Context
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
static constexpr uint64_t data[1]
Future< typename std::decay< T >::type > makeFuture(T &&t)
internal::ReturnAction< R > Return(R value)
TEST_F(AcceptorTest, TestCanAcceptWithNoConnectionCounter)