[ 
https://issues.apache.org/jira/browse/HADOOP-14277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962660#comment-15962660
 ] 

Weiwei Yang commented on HADOOP-14277:
--------------------------------------

Improved {{TestTrash#testTrashRestart}} in following ways

# Renamed {{testTrashRestart}} to {{testTrashInterfaces}} because this test 
generally verifies {{Trash}} and {{TrashPolicy}} API, and the expected behavior 
how it can be used.
# Removed inner classes {{AuditableCheckpoints}}, {{AuditableTrashPolicy}}, 
these helper classes were used to log counts for checkpoints. This patch now 
re-implement this with mockito approach, to verify if the method gets called by 
given times. Now most of short slice of sleeps are removed, instead using count 
down hatch to simulate time interval, it should be more reliable.
# Improved java docs

> TestTrash.testTrashRestarts is flaky
> ------------------------------------
>
>                 Key: HADOOP-14277
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14277
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Eric Badger
>            Assignee: Weiwei Yang
>         Attachments: HADOOP-14277.001.patch
>
>
> {noformat}
> junit.framework.AssertionFailedError: Expected num of checkpoints is 2, but 
> actual is 3 expected:<2> but was:<3>
>       at junit.framework.Assert.fail(Assert.java:57)
>       at junit.framework.Assert.failNotEquals(Assert.java:329)
>       at junit.framework.Assert.assertEquals(Assert.java:78)
>       at junit.framework.Assert.assertEquals(Assert.java:234)
>       at junit.framework.TestCase.assertEquals(TestCase.java:401)
>       at 
> org.apache.hadoop.fs.TestTrash.verifyAuditableTrashEmptier(TestTrash.java:892)
>       at org.apache.hadoop.fs.TestTrash.testTrashRestarts(TestTrash.java:593)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to