[
https://issues.apache.org/jira/browse/HADOOP-13848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Zhuge updated HADOOP-13848:
--------------------------------
Description:
Both hadoop-aws and hadoop-openstack require the existence of file
{{src/test/resources/auth-keys.xml}} to run the tests. With the design of the
pom.xml, the non-existence of auth-keys.xml also prevents building the test
code. Unfortunately this leads to delayed detection of build problems in test
code, e.g., introduced by a mistake in backports.
{code}
<profile>
<id>tests-off</id>
<activation>
<file>
<missing>src/test/resources/auth-keys.xml</missing>
</file>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<id>tests-on</id>
<activation>
<file>
<exists>src/test/resources/auth-keys.xml</exists>
</file>
</activation>
<properties>
<maven.test.skip>false</maven.test.skip>
</properties>
</profile>
{code}
Section {{Skipping by Default}} in
http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html
proposes a solution. Any time you want to run tests, you must do 2 things
instead of 1:
* Copy auth-keys.xml to src/test/resources
* Run {{mvn install}} with the extra {{-DskipTests=false}}
Would like the community to weigh in on this.
was:
Both hadoop-aws and hadoop-openstack require the existence of file
{{src/test/resources/auth-keys.xml}} to run the tests. With the design of the
pom.xml, the non-existence of auth-keys.xml also prevents building the test
code. Unfortunately this leads to delayed detection of build problems in test
code, e.g., introduced by a mistake in backports.
{code}
<profile>
<id>tests-off</id>
<activation>
<file>
<missing>src/test/resources/auth-keys.xml</missing>
</file>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<id>tests-on</id>
<activation>
<file>
<exists>src/test/resources/auth-keys.xml</exists>
</file>
</activation>
<properties>
<maven.test.skip>false</maven.test.skip>
</properties>
</profile>
{code}
Section {{Skipping by Default}} in
http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html
proposes a second solution. Any time you want to run tests, you must do 2
things instead of 1:
* Copy auth-keys.xml to src/test/resources
* Run {{mvn install}} with the extra {{-DskipTests=false}}
Would like the community to weigh in on this.
> Missing auth-keys.xml prevents detecting test code build problem
> ----------------------------------------------------------------
>
> Key: HADOOP-13848
> URL: https://issues.apache.org/jira/browse/HADOOP-13848
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs/s3, fs/swift, test
> Reporter: John Zhuge
> Assignee: John Zhuge
> Priority: Minor
>
> Both hadoop-aws and hadoop-openstack require the existence of file
> {{src/test/resources/auth-keys.xml}} to run the tests. With the design of the
> pom.xml, the non-existence of auth-keys.xml also prevents building the test
> code. Unfortunately this leads to delayed detection of build problems in test
> code, e.g., introduced by a mistake in backports.
> {code}
> <profile>
> <id>tests-off</id>
> <activation>
> <file>
> <missing>src/test/resources/auth-keys.xml</missing>
> </file>
> </activation>
> <properties>
> <maven.test.skip>true</maven.test.skip>
> </properties>
> </profile>
> <profile>
> <id>tests-on</id>
> <activation>
> <file>
> <exists>src/test/resources/auth-keys.xml</exists>
> </file>
> </activation>
> <properties>
> <maven.test.skip>false</maven.test.skip>
> </properties>
> </profile>
> {code}
> Section {{Skipping by Default}} in
> http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html
> proposes a solution. Any time you want to run tests, you must do 2 things
> instead of 1:
> * Copy auth-keys.xml to src/test/resources
> * Run {{mvn install}} with the extra {{-DskipTests=false}}
> Would like the community to weigh in on this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]