[ https://issues.apache.org/jira/browse/HDFS-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961984#comment-13961984 ]
Mit Desai commented on HDFS-6195: --------------------------------- While cleaning up the containers, {code} while (cleanedSize < allocatedSize && waitCount++ < 200) { Thread.sleep(100); resp = nm.nodeHeartbeat(true); cleaned = resp.getContainersToCleanup(); cleanedSize += cleaned.size(); } {code} The test sometimes cannot do the complete cleanup and some of the 10000 containers cannot be cleaned up. Resulting an assertion error at {{Assert.assertEquals(allocatedSize, cleanedSize);}}. This test has been failing in our nightly builds since couple of days. I was able to reproduce this consistently on eclipse but not using maven. I think this is an environment issue so cannot be reproduced everywhere. As a fix, I have increased the thread sleep time in the while loop. Which will give some extra time for the container cleanup. And as there is also a check in the while loop for the allocated size and cleaned size, the test will not always take up all cycles in the loop. > TestRMApplicationHistoryWriter#testRMWritingMassiveHistory runs slow and > intermittently fails on trunk and branch2 > ------------------------------------------------------------------------------------------------------------------ > > Key: HDFS-6195 > URL: https://issues.apache.org/jira/browse/HDFS-6195 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 3.0.0, 2.5.0 > Reporter: Mit Desai > Assignee: Mit Desai > Fix For: 3.0.0, 2.5.0 > > Attachments: HDFS-6195.patch > > > The test has 10000 containers that it tries to cleanup. > The cleanup has a timeout of 20000ms in which the test sometimes cannot do > the cleanup completely and gives out an Assertion Failure. -- This message was sent by Atlassian JIRA (v6.2#6252)