[
https://issues.apache.org/jira/browse/HDFS-12675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16208869#comment-16208869
]
Yiqun Lin edited comment on HDFS-12675 at 10/18/17 10:17 AM:
-------------------------------------------------------------
I just debugged the test. The root cause of this is that {{Thread#sleep}} in
{{LeaseMonitor#run}} slowly ran than sleep operation executed in test. During
the test, I found {{LeaseMonitor#run}} would run one or two empty iterations
then prepare sleep for release lease4 and lease5. But here we only increase a
little delay time for desired sleep time. So there is a chance this delay is
smaller than empty-iterations running time.
One simple way is to increase the sleep in test to ensure the lease is released
and its callback be done.
was (Author: linyiqun):
I just debugged the test. The root cause of this is that {{Thread#sleep}} in
{{LeaseMonitor#run}} slowly ran than sleep operation executed in test. During
the test, I found {{LeaseMonitor#run}} would run one or two empty iterations
then prepare sleep for release lease4 and lease5. But here we only increase a
little delay time for desired sleep time. So there is a chance this delay is
smaller than empty-iterations running time.
One simple way is to increase the sleep in test to ensure the lease is released
in loop.
> Ozone: TestLeaseManager#testLeaseCallbackWithMultipleLeases fails
> ------------------------------------------------------------------
>
> Key: HDFS-12675
> URL: https://issues.apache.org/jira/browse/HDFS-12675
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Attachments: HDFS-12675-HDFS-7240.001.patch
>
>
> Caught one UT failure
> {{TestLeaseManager#testLeaseCallbackWithMultipleLeases}}:
> {noformat}
> jcava.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> org.apache.hadoop.ozone.lease.TestLeaseManager.testLeaseCallbackWithMultipleLeases(TestLeaseManager.java:293)
> {noformat}
> The reason of this error is lease {{leaseFive}} didn't expire in test.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]