@Override
    public int getVal(Phase phase) {
      if (!JVM.isUnix()) {
        return 0;
      }
      JVM jvm = new JVM();
      return (int) jvm.getOpenFileDescriptorCount();
    }
Listen to the test progress and check the usage of:
<ul>
<li>threads</li>
<li>open file descriptor</li>
<li>max open file descriptor</li>
</ul>
<p>
When surefire forkMode=once/always/perthread, this code is executed on the forked process.
hbase-common/src/test/java/org/apache/hadoop/hbase/ResourceCheckerJUnitListener.java