@Test
  public void testAcquireTimeout() throws Exception {
    EmbeddedChannelPool channelPool = new EmbeddedChannelPool(new TimeoutException("Timeout"));
    InetSocketAddress address = new InetSocketAddress("localhost", 2021);
    Http2BlockingChannel blockingChannel = new Http2BlockingChannel(channelPool, address, createHttp2ClientConfig());

    byte[] byteArray = new byte[1234];
    new Random().nextBytes(byteArray);
    ByteBuf content = PooledByteBufAllocator.DEFAULT.heapBuffer(1234).writeBytes(byteArray);
    MockSend send = new MockSend(content);

    try {
      blockingChannel.sendAndReceive(send);
      Assert.fail("Should fail in acquire");
    } catch (IOException e) {
    }
    content.release();
  }
Test when acquiring channel times out.
@throws Exception
ambry-network/src/test/java/com/github/ambry/network/http2/Http2BlockingChannelTest.java