[
https://issues.apache.org/jira/browse/HADOOP-19826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18063814#comment-18063814
]
ASF GitHub Bot commented on HADOOP-19826:
-----------------------------------------
deepujain opened a new pull request, #8304:
URL: https://github.com/apache/hadoop/pull/8304
## HADOOP-19826. Add contract test to verify renaming empty dir works
### Summary
Adds a contract test `testRenameEmptyDir` in `AbstractContractRenameTest`
that verifies filesystems correctly support renaming an empty directory to a
new path: create an empty directory, rename it to a new path, assert rename
returns true and the directory exists at the destination and no longer at the
source.
### Change
- **File:**
`hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRenameTest.java`
- New test method `testRenameEmptyDir()`: creates an empty dir under
`testRenameEmptyDir/src`, renames it to `testRenameEmptyDir/dest`, asserts
`rename()` returns true, destination is a directory, and source path does not
exist.
### JIRA
Fixes HADOOP-19826
> Add contract test to verify renaming empty dir works
> ----------------------------------------------------
>
> Key: HADOOP-19826
> URL: https://issues.apache.org/jira/browse/HADOOP-19826
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs, fs/gcs, fs/s3
> Affects Versions: 3.5.0
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Priority: Minor
> Labels: pull-request-available
>
> Add a quick new test for the corner case of verifying that when an empty dir
> is renamed, the dest dir exists and the old path doesn't.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]