hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei-Chiu Chuang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9438) TestPipelinesFailover assumes Linux ifconfig
Date Mon, 23 Nov 2015 23:17:11 GMT

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

Wei-Chiu Chuang commented on HDFS-9438:
---------------------------------------

Hi [~jzhuge] thanks for the patch and welcome to contribute to HDFS!

Just one comment: you can use assumeTrue() to replace if(!Shell.INUX && !Shell.SOLARIS)
For example,
assumeTrue( Shell.LNUX || Shell.SOLARIS );

(You can search for assumeTrue in other test cases for its common usage)
Using this, a test case will be skipped if it's not running under both LINUX or SOLARIS.

> TestPipelinesFailover assumes Linux ifconfig
> --------------------------------------------
>
>                 Key: HDFS-9438
>                 URL: https://issues.apache.org/jira/browse/HDFS-9438
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 2.7.1
>         Environment: Solaris
>            Reporter: Alan Burlison
>            Assignee: John Zhuge
>            Priority: Minor
>         Attachments: HDFS-9438-hdfs-9438.001.patch
>
>
> TestPipelinesFailover.java contains the following:
> {code}
>     scmd = new String[] {"ifconfig"};
>     sce = new ShellCommandExecutor(scmd);
>     sce.execute();
>     System.out.println("'ifconfig' output:\n" + sce.getOutput());
> {code}
> That assumes the Linux ifconfig command. If the flag "-a" is added, the same invocation
should work on both Linux and Solaris - the output is only displayed for debugging purposes
so the fact that the output of ifconfig is different on Linux and Solaris shouldn't matter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message