[
https://issues.apache.org/jira/browse/HADOOP-9427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327646#comment-15327646
]
Arpit Agarwal commented on HADOOP-9427:
---------------------------------------
Hi [~GergelyNovak], yes this is what I had in mind and what Steve helpfully
suggested. Thanks for taking this up. Minor comments:
# assumeNotWindows is a better name than assumeUnix, since Linux and OS X are
technically Unix-like.
# A couple of explanatory comments are lost by the patch. We should retain
these comments. e.g. in TestFileUtil.java.
{code}
- if(Shell.WINDOWS) {
- // windows Dir.setWritable(false) does not work for directories
- return;
- }
+ assumeUnix();
{code}
Also it looks like there is one YARN test (TestYARNRunner#testAMStandardEnv)
that needs a similar fix. We can fix it in a separate YARN jira.
> use jUnit assumptions to skip platform-specific tests
> -----------------------------------------------------
>
> Key: HADOOP-9427
> URL: https://issues.apache.org/jira/browse/HADOOP-9427
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 1-win, 3.0.0-alpha1
> Reporter: Arpit Agarwal
> Assignee: Gergely Novák
> Attachments: HADOOP-9427.001.patch, HADOOP-9427.002.patch,
> HADOOP-9427.003.patch, HADOOP-9427.004.patch
>
>
> Certain tests for platform-specific functionality are either executed only on
> Windows or bypass on Windows using checks like "if (Path.WINDOWS)" e.g.
> TestNativeIO.
> Prefer using jUnit assumptions instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]