[
https://issues.apache.org/jira/browse/HADOOP-14277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955941#comment-15955941
]
Eric Badger commented on HADOOP-14277:
--------------------------------------
This test ran on hardware that is decently well-loaded and so might have some
extra latency in it. I believe that this exacerbated a race condition in the
test. If the trash emptierThread takes more than 20ms to delete a checkpoint,
then the test will fail, since there is only 20ms of wiggle room between the
deletion interval and the time that the emptierThread is alive.
Also, I'm not sure I quite understand what this test is testing. The comment
above the test says that it is testing fs.trash.interval after a restart, but
I'm unclear on where the restart occurs or how this is simulated. And along
those lines, if I followed the code correctly, fs.trash.interval is set by
AuditableTrashPolicy.initialize, which is test code. We then test to make sure
that the interval got updated correctly. But the test controls the interval
that was written as well as the interval that was used. This would seem to mean
that we're testing the test code rather than a production TrashPolicy
implementation.
[~xyao], [~cheersyang], can you help me understand the test and give
suggestions on fixing the race?
> 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
>
> {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]