Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
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.)
Attachments
Issue Links
- breaks
-
HADOOP-17376 ITestS3AContractRename failing against stricter tests
- Resolved
-
HADOOP-17396 ABFS: testRenameFileOverExistingFile Fails after Contract test update
- Resolved
- causes
-
HADOOP-17459 ADL Gen1: Fix the test case failures which are failing after the contract test update in hadoop-common
- Resolved
- links to