hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira Ajisaka (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13514) Upgrade maven surefire plugin to 2.19.1
Date Wed, 26 Oct 2016 04:50:58 GMT

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

Akira Ajisaka commented on HADOOP-13514:
----------------------------------------

Thanks [~jojochuang] for reporting this. I looked into this problem and found that the problem
is caused by SUREFIRE-649 (fixed in surefire 2.18).
Before SUREFIRE-649, {{System.getProperty("test.build.classes")}} was null, but after SUREFIRE-649
the value is an empty string. Therefore the following method returns {{"/" + basename + ".properties"}}
when the value is an empty string. Before the fix, the method returned {{"target/test-classes/"
+ basename + ".properties"}}.
{code:title=TestMetricsConfig.java}
  public static String getTestFilename(String basename) {
      return System.getProperty("test.build.classes", "target/test-classes") +
             "/"+ basename +".properties";
{code}
That way the tests save a file to {{/hadoop-metrics2-azure-file-system.properties.properties}}
and fail to save it by permission error. Before the fix, the tests saved a file to {{target/test-classes/hadoop-metrics2-azure-file-system.properties.properties}}.
I'm thinking we can fix by setting "test.build.classes" in pom.xml to fix this issue.

> Upgrade maven surefire plugin to 2.19.1
> ---------------------------------------
>
>                 Key: HADOOP-13514
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13514
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 2.8.0
>            Reporter: Ewan Higgs
>            Assignee: Ewan Higgs
>            Priority: Minor
>             Fix For: 2.8.0, 3.0.0-alpha2
>
>         Attachments: HADOOP-13514.002.patch, surefire-2.19.patch
>
>
> A lot of people working on Hadoop don't want to run all the tests when they develop;
only the bits they're working on. Surefire 2.19 introduced more useful test filters which
let us run a subset of the tests that brings the build time down from 'come back tomorrow'
to 'grab a coffee'.
> For instance, if I only care about the S3 adaptor, I might run:
> {code}
> mvn test -Dmaven.javadoc.skip=true -Pdist,native -Djava.awt.headless=true \"-Dtest=org.apache.hadoop.fs.*,
org.apache.hadoop.hdfs.*, org.apache.hadoop.fs.s3a.*\"
> {code}
> We can work around this by specifying the surefire version on the command line but it
would be better, imo, to just update the default surefire used.
> {code}
> mvn test -Dmaven.javadoc.skip=true -Pdist,native -Djava.awt.headless=true \"-Dtest=org.apache.hadoop.fs.*,
org.apache.hadoop.hdfs.*, org.apache.hadoop.fs.s3a.*\" -Dmaven-surefire-plugin.version=2.19.1
> {code}



--
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


Mime
View raw message