public void updateReaders(boolean await, List<HStoreFile> sfs,
      List<KeyValueScanner> memStoreScanners) throws IOException {
      if (await) {
        try {
          latch.await();
        } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
      super.updateReaders(sfs, memStoreScanners);
      if (!await) {
        latch.countDown();
      }
    }
This test tests whether parallel {@link StoreScanner#close()} and
{@link StoreScanner#updateReaders(List, List)} works perfectly ensuring that there are no
references on the existing Storescanner readers.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScannerClosure.java