You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Arpit Agarwal (JIRA)" <ji...@apache.org> on 2016/06/13 15:59:21 UTC

[jira] [Comment Edited] (HADOOP-9427) use jUnit assumptions to skip platform-specific tests

    [ https://issues.apache.org/jira/browse/HADOOP-9427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327646#comment-15327646 ] 

Arpit Agarwal edited comment on HADOOP-9427 at 6/13/16 3:58 PM:
----------------------------------------------------------------

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 more YARN test (TestYARNRunner#testAMStandardEnv) that needs a similar fix. -We can fix it in a separate YARN jira.- 


was (Author: arpitagarwal):
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org