HADOOP-19826. Add contract test to verify renaming empty dir works.#8304
Merged
steveloughran merged 1 commit intoapache:trunkfrom Mar 9, 2026
Merged
Conversation
Add testRenameEmptyDir in AbstractContractRenameTest.
|
🎊 +1 overall
This message was automatically generated. |
Contributor
|
I see my PR of #8283 has been approved already, so I could just merge that, but as your's actually adds more assertions it's the better one of the two. +1 |
steveloughran
approved these changes
Mar 9, 2026
Contributor
|
@deepujain merged this to trunk. what is your JIRA username for credit there? |
6 tasks
steveloughran
pushed a commit
that referenced
this pull request
Mar 9, 2026
…8304) Add testRenameEmptyDir in AbstractContractRenameTest. Contributed by Deepak Jain
Contributor
Author
|
@steveloughran JIRA id is deepujain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HADOOP-19826. Add contract test to verify renaming empty dir works
Summary
Adds a contract test
testRenameEmptyDirinAbstractContractRenameTestthat 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
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractRenameTest.javatestRenameEmptyDir(): creates an empty dir undertestRenameEmptyDir/src, renames it totestRenameEmptyDir/dest, assertsrename()returns true, destination is a directory, and source path does not exist.JIRA
Fixes HADOOP-19826