You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/09 16:25:00 UTC

[jira] [Updated] (HADOOP-17365) Contract test for renaming over existing file is too lenient

     [ https://issues.apache.org/jira/browse/HADOOP-17365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HADOOP-17365:
------------------------------------
    Labels: pull-request-available  (was: )

> Contract test for renaming over existing file is too lenient
> ------------------------------------------------------------
>
>                 Key: HADOOP-17365
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17365
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: test
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{AbstractContractRenameTest#testRenameFileOverExistingFile}} is too lenient in its assertions.
> * {{FileAlreadyExistsException}} is accepted regardless of "rename overwrites" and "rename returns false if exists" contract options.  I think it should be accepted only if both of those options are false.
> * "rename returns false if exists" option is ignored if the file is not overwritten by the implementation.
> Also, I think the "rename returns false if exists" option is incorrectly inverted in the test, which it can get away with because the checks are loose.
> (Found this while looking at a change in Ozone FS implementation from throwing exception to returning false.  The contract test unexpectedly passed without changing {{contract.xml}}.)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org