The test TestMaintenanceState#testWithNNAndDNRestart fails in trunk. The stack info( https://builds.apache.org/job/PreCommit-HDFS-Build/18423/testReport/ ):
The failure seems due to pending block has not been replicated. We can bump the retry times since sometimes the cluster would be busy. Also we can use GenericTestUtils#waitFor to simplified the current compared logic.