private void waitForStoreFileCount(HStore store, int count, int timeout)
    throws InterruptedException {
    long start = EnvironmentEdgeManager.currentTime();
    while (
      start + timeout > EnvironmentEdgeManager.currentTime() && store.getStorefilesCount() != count
    ) {
      Thread.sleep(100);
    }
    System.out.println("start=" + start + ", now=" + EnvironmentEdgeManager.currentTime() + ", cur="
      + store.getStorefilesCount());
    assertEquals(count, store.getStorefilesCount());
  }
Tests that cache on write works all the way up from the client-side. Performs inserts, flushes,
and compactions, verifying changes in the block cache along the way.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide5.java