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

Chen Liang commented on HDFS-12940:
-----------------------------------

[~nandakumar131] how often did you see these tests fail? I ran 
{{TestKeySpaceManager}} about twenty times. The only fail I saw was there was 
one time {{testExpiredOpenKey}} failed on 
{{Assert.assertFalse(removed.contains(keyName));}}.

If {{testWriteSize}} and {{testListKeys}} fail with {{error:KEY_NOT_FOUND}} 
then, I would guess it is probably because these tests were being slow and took 
several seconds to run, and because 
{{OZONE_OPEN_KEY_CLEANUP_SERVICE_INTERVAL_SECONDS}} is also only a couple 
seconds, those keys got cleaned up. If this is the case, then I think it is 
probably best to make {{testExpiredOpenKey}} a separate test and leave  
{{OZONE_OPEN_KEY_CLEANUP_SERVICE_INTERVAL_SECONDS}} in {{TestKeySpaceManager}} 
as the default value of a very long time.

> Ozone: KSM: TestKeySpaceManager#testExpiredOpenKey fails occasionally
> ---------------------------------------------------------------------
>
>                 Key: HDFS-12940
>                 URL: https://issues.apache.org/jira/browse/HDFS-12940
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Nanda kumar
>            Assignee: Nanda kumar
>         Attachments: HDFS-12940-HDFS-7240.000.patch, 
> HDFS-12940-HDFS-7240.001.patch
>
>
> {{TestKeySpaceManager#testExpiredOpenKey}} is flaky.
> In {{testExpiredOpenKey}} we are opening four keys for writing and wait for 
> them to expire (without committing). Verification/Assertion is done by 
> querying {{MiniOzoneCluster}} and matching the count. Since the {{cluster}} 
> instance of {{MiniOzoneCluster}} is shared between test-cases in 
> {{TestKeySpaceManager}}, we should not rely on the count. The verification 
> should only happen by matching the keyNames and not with the count.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to