@Test
  public void recordsWithReservedStreamsAreNotClosedAfterTimeout() throws InterruptedException {
    EmbeddedChannel channel = newHttp2Channel();
    MultiplexedChannelRecord record =
        new MultiplexedChannelRecord(channel, 2, idleTimeoutMillis, streamChannelInitializer);

    Promise<Channel> streamPromise = channel.eventLoop().newPromise();
    Promise<Channel> streamPromise2 = channel.eventLoop().newPromise();
    record.acquireStream(streamPromise);
    record.acquireStream(streamPromise2);

    channel.runPendingTasks();

    assertTrue(streamPromise.isSuccess());
    assertTrue(streamPromise2.isSuccess());
    assertTrue(channel.isOpen());

    record.closeAndReleaseChild(streamPromise.getNow());

    assertTrue(channel.isOpen());

    Thread.sleep(idleTimeoutMillis * 2);
    channel.runPendingTasks();

    assertTrue(channel.isOpen());
  }
Idle timeout is not applied if there is active stream.
ambry-network/src/test/java/com/github/ambry/network/http2/MultiplexedChannelRecordTest.java