Skip to content

Commit

Permalink
[FLINK-5749] [build] Unset HADOOP_HOME and HADOOP_CONF_DIR variables …
Browse files Browse the repository at this point in the history
…for tests

This unsets the HADOOP_HOME and HADOOP_CONF_DIR envirobment variables for tests, to avoid
that the tests pick those variable up from build servers and produce unexpected test
results.

This closes apache#3288
  • Loading branch information
wenlong.lwl authored and StephanEwen committed Feb 20, 2017
1 parent f113d79 commit 4810937
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flink-connectors/flink-connector-filesystem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ under the License.
-->
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>

<environmentVariables>
<!-- Make sure external hadoop environment will not affect maven building -->
<HADOOP_HOME />
<HADOOP_CONF_DIR />
</environmentVariables>
</configuration>
</plugin>
</plugins>
Expand Down
13 changes: 13 additions & 0 deletions flink-connectors/flink-hadoop-compatibility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,19 @@ under the License.
<configLocation>${project.basedir}/../../tools/maven/scalastyle-config.xml</configLocation>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<environmentVariables>
<!-- Make sure external hadoop environment will not affect maven building -->
<HADOOP_HOME />
<HADOOP_CONF_DIR />
</environmentVariables>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
18 changes: 18 additions & 0 deletions flink-fs-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,22 @@ under the License.
<version>${hadoop.version}</version><!--$NO-MVN-MAN-VER$-->
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<environmentVariables>
<!-- Make sure external hadoop environment will not affect maven building -->
<HADOOP_HOME />
<HADOOP_CONF_DIR />
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>


</project>
5 changes: 5 additions & 0 deletions flink-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ under the License.
<classpathDependencyExclude>org.apache.curator:curator-framework</classpathDependencyExclude>
</classpathDependencyExcludes>
<reuseForks>false</reuseForks>
<environmentVariables>
<!-- Make sure external hadoop environment will not affect maven building -->
<HADOOP_HOME />
<HADOOP_CONF_DIR />
</environmentVariables>
</configuration>
</plugin>

Expand Down

0 comments on commit 4810937

Please sign in to comment.