This test was added as part of
HDFS-8883, There is a race condition in the test and it has failed once in the Apache Jenkins run.
Here is the stack
Expected number of blocked thread not found expected:<3> but was:<1>
java.lang.AssertionError: Expected number of blocked thread not found expected:<3> but was:<1>
From cursory code reading , even though we call into readlock.lock() there is no guarantee that our thread is put in the wait queue. A proposed fix could be to check for any thread in the lock queue instead of all 3, or disable the test.
It could also indicate an issue with the test infra-structure but any test open to variations in result due to infra-structure issues creates noise in tests so we are better off fixing it.