@Test public void shouldNotPropagateUpstreamOpenWhileBarrierFutureNotDone() throws Exception { context.checking(new Expectations() { { oneOf(upstream).handleUpstream(with(any(ChannelHandlerContext.class)), with(any(PreparationEvent.class))); } }); channelFactory.newChannel(pipeline); ChannelFuture handlerFuture = handler.getHandlerFuture(); assertFalse(handlerFuture.isDone()); assertTrue(handler.hasQueuedChannelEvents()); context.assertIsSatisfied(); }
boolean hasQueuedChannelEvents() { return queue != null && !queue.isEmpty(); }
AwaitBarrierUpstreamHandler extends AbstractBarrierHandler implements ChannelUpstreamHandler { boolean hasQueuedChannelEvents() { return queue != null && !queue.isEmpty(); } }
AwaitBarrierUpstreamHandler extends AbstractBarrierHandler implements ChannelUpstreamHandler { boolean hasQueuedChannelEvents() { return queue != null && !queue.isEmpty(); } AwaitBarrierUpstreamHandler(Barrier barrier); }
AwaitBarrierUpstreamHandler extends AbstractBarrierHandler implements ChannelUpstreamHandler { boolean hasQueuedChannelEvents() { return queue != null && !queue.isEmpty(); } AwaitBarrierUpstreamHandler(Barrier barrier); @Override void prepareRequested(final ChannelHandlerContext ctx, PreparationEvent evt); }
AwaitBarrierUpstreamHandler extends AbstractBarrierHandler implements ChannelUpstreamHandler { boolean hasQueuedChannelEvents() { return queue != null && !queue.isEmpty(); } AwaitBarrierUpstreamHandler(Barrier barrier); @Override void prepareRequested(final ChannelHandlerContext ctx, PreparationEvent evt);  }