We have seen TestQueueCapacities fail periodically and there have been a couple of times fixes partially fixed the problem, the most recent instance being
HADOOP-5869. I found another instance of failure, while running tests locally while testing a different patch. This was a different symptom from the ones we've seen before. The core problem is that the test is too complex and relies on too many things working correctly to be useful. It would make sense to revisit the purpose of the test and see if a simpler model can serve it.