private long randLong(long n) {
    long l = RNG.nextLong();
    if (l == Long.MIN_VALUE) l = Long.MAX_VALUE;
    return Math.abs(l) % n;
  }
Disable this when this test fails hopelessly and you need to debug a simpler case.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java