Similar to YARN-5024, this test fails intermittently showing better passing rate through the addition of rm.drainEvents() after node heartbeats and finishAMAndVerifyAppState in amRestartTests() but does not fully fix the problem.
CC: Bibin Chundatt for more insight/comments.
is related to
YARN-4929Explore a better way than sleeping for a while in some test cases
YARN-5024TestContainerResourceUsage#testUsageAfterAMRestartWithMultipleContainers random failure