public void setTimeoutForWriteLock(long timeoutForWriteLock) {
    assert timeoutForWriteLock >= 0;
    this.timeoutForWriteLock = timeoutForWriteLock;
  }
The {@link HRegion#doClose} will block forever if someone tries proving the dead lock via the
unit test. Instead of blocking, the {@link HRegion#doClose} will throw exception if you set the
timeout.
@param timeoutForWriteLock the second time to wait for the write lock in
                           {@link HRegion#doClose}
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java