-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-16825: Checkaccess testcase fix #1821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
thanks. Where did you test this, -and have you tried without the oauth settings? |
|
FWIW I've done a local test run in my configuration, but I need that test run info from @bilaharith too. |
|
mvn -T 1C -Dparallel-tests=abfs -Dscale -DtestsThreadCount=2 clean verify Driver test results using an account with namespace support in Central India: Driver test results using an account without namespace support in Central India: |
| public void access(final Path path, final FsAction mode) throws IOException { | ||
| LOG.debug("AzureBlobFileSystem.access path : {}, mode : {}", path, mode); | ||
| Path qualifiedPath = makeQualified(path); | ||
| Path qualifiedPath = path == null ? null : makeQualified(path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original line 949 is correct. If path is null, FileSystem.access should throw IllegalArgumentException and that's what calling makeQualified(path) will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping it this way as we don't need to break the existing flow when the checkaccess flag is false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t follow. What flow are you referring to? I think you should revert this line because null path should result in IllegalArgumentException. Calling makeQualified is a standard thing done by all the APIs taking a Path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the addition as discussed.
|
|
||
| private FileSystem getTestUserFs() throws Exception { | ||
| private void setTestUserFs() throws Exception { | ||
| if(this.testUserFs != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please add a space between if and (.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| this.testUserFs = fs; | ||
| } | ||
|
|
||
| @Test(expected = IllegalArgumentException.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is expected to throw IllegalArgumentException.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
🎊 +1 overall
This message was automatically generated. |
NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute