[
https://issues.apache.org/jira/browse/HADOOP-14277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966289#comment-15966289
]
Weiwei Yang commented on HADOOP-14277:
--------------------------------------
Hi [~ebadger]
Thanks for your comments. Regarding to your two comments
bq. We shouldn't be sleeping for this long ...
I just uploaded v3 patch, in this patch I completely removed sleep code.
Replaced with {{GenericTestUtils.waitFor()}} like you suggested to sync with
emptier thread's work at each time interval with main thread. Now the test is
running super fast, please check.
bq. It would be nice if we didn't have to instantiate a new CountDownLatch
every time we loop...
I think you know I do that because I can't reset a {{CountDownLatch}}... well I
actually thought about using {{CyclicBarrier}} and even {{Phaser}}, but could
not find out a neat way though. The major reason is I need to simulate emptier
intervals, and different intervals (current patch first verification interval
is count 1, and second is count 2). If you think there is a better way to do
so, please let me know. Anyway current approach doesn't bring us much overhead.
> 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, HADOOP-14277.002.patch,
> HADOOP-14277.003.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]