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

Chris Nauroth updated HDFS-4260:
--------------------------------

    Attachment: HDFS-4260-branch-trunk-win.1.patch

With the attached patch, these tests are passing on Windows.

The problem is that helper methods for getting the testing root path in 
{{FileContextTestHelper}} and {{FileSystemTestHelper}} would always return 
paths containing the drive spec, like C:.  The ':' character is not valid in an 
HDFS path, so the tests would fail during setup.  I've added logic to strip the 
drive spec.

Depending on the test suite, we may or may not want to strip the drive spec.  
For tests covering local file system, we would still want tests to cover 
inclusion of the drive spec.  For tests covering HDFS, we need to strip it.  To 
support that, individual tests now parameterize the behavior they want by 
configuring an instance of {{FileContextTestHelper}} or 
{{FileSystemTestHelper}}.  This also involved converting several static methods 
to member methods and updating call sites.  In a few cases, I was able to 
reduce the number of impacted call sites by defining additional protected 
helper methods in the abstract base classes like {{FSMainOperationsBaseTest}}.

                
> incorrect inclusion of drive spec in test root path causes multiple HDFS test 
> failures on Windows
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4260
>                 URL: https://issues.apache.org/jira/browse/HDFS-4260
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: trunk-win
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-4260-branch-trunk-win.1.patch
>
>
> Multiple HDFS test suites fail early during initialization on Windows because 
> of inclusion of the drive spec in the test root path.  The ':' gets rejected 
> as an invalid character by the logic of isValidName.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to