@Test public void failedConnectionAcquireNotifiesPromise() throws InterruptedException { IOException exception = new IOException(); ChannelPool connectionPool = mock(ChannelPool.class); when(connectionPool.acquire()).thenReturn(new FailedFuture<>(loopGroup.next(), exception)); ChannelPool pool = new Http2MultiplexedChannelPool(connectionPool, loopGroup.next(), new HashSet<>(), null, http2ClientConfigForOneConnection, new Http2ClientMetrics(new MetricRegistry()), streamChannelInitializer); Future<Channel> acquirePromise = pool.acquire().await(); assertFalse(acquirePromise.isSuccess()); assertEquals(acquirePromise.cause(), exception); }
@Override public Future<Channel> acquire() { return acquire(eventLoopGroup.next().newPromise()); }
Http2MultiplexedChannelPool implements ChannelPool { @Override public Future<Channel> acquire() { return acquire(eventLoopGroup.next().newPromise()); } }
Http2MultiplexedChannelPool implements ChannelPool { @Override public Future<Channel> acquire() { return acquire(eventLoopGroup.next().newPromise()); } Http2MultiplexedChannelPool(InetSocketAddress inetSocketAddress, SSLFactory sslFactory,
      EventLoopGroup eventLoopGroup, Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer);   Http2MultiplexedChannelPool(ChannelPool connectionPool, EventLoopGroup eventLoopGroup,
      Set<MultiplexedChannelRecord> connections, InetSocketAddress inetSocketAddress,
      Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer); }
Http2MultiplexedChannelPool implements ChannelPool { @Override public Future<Channel> acquire() { return acquire(eventLoopGroup.next().newPromise()); } Http2MultiplexedChannelPool(InetSocketAddress inetSocketAddress, SSLFactory sslFactory,
      EventLoopGroup eventLoopGroup, Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer);   Http2MultiplexedChannelPool(ChannelPool connectionPool, EventLoopGroup eventLoopGroup,
      Set<MultiplexedChannelRecord> connections, InetSocketAddress inetSocketAddress,
      Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer); InetSocketAddress getInetSocketAddress(); @Override Future<Channel> acquire(); @Override Future<Channel> acquire(Promise<Channel> promise); @Override Future<Void> release(Channel childChannel); @Override Future<Void> release(Channel childChannel, Promise<Void> promise); void handleGoAway(Channel parentChannel, int lastStreamId, GoAwayException exception); @Override void close(); }
Http2MultiplexedChannelPool implements ChannelPool { @Override public Future<Channel> acquire() { return acquire(eventLoopGroup.next().newPromise()); } Http2MultiplexedChannelPool(InetSocketAddress inetSocketAddress, SSLFactory sslFactory,
      EventLoopGroup eventLoopGroup, Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer);   Http2MultiplexedChannelPool(ChannelPool connectionPool, EventLoopGroup eventLoopGroup,
      Set<MultiplexedChannelRecord> connections, InetSocketAddress inetSocketAddress,
      Http2ClientConfig http2ClientConfig, Http2ClientMetrics http2ClientMetrics,
      ChannelInitializer streamChannelInitializer); InetSocketAddress getInetSocketAddress(); @Override Future<Channel> acquire(); @Override Future<Channel> acquire(Promise<Channel> promise); @Override Future<Void> release(Channel childChannel); @Override Future<Void> release(Channel childChannel, Promise<Void> promise); void handleGoAway(Channel parentChannel, int lastStreamId, GoAwayException exception); @Override void close();  }