You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ka...@apache.org on 2013/06/15 21:28:25 UTC
git commit: SQOOP-1067: Sqoop2: Tests should not use /tmp/ directory
for storing data
Updated Branches:
refs/heads/sqoop2 fd35311e4 -> c8b4581f2
SQOOP-1067: Sqoop2: Tests should not use /tmp/ directory for storing data
(Jarek Jarcec Cecho via Kate Ting)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/c8b4581f
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/c8b4581f
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/c8b4581f
Branch: refs/heads/sqoop2
Commit: c8b4581f2081d72a54f68e2e5d7aa8c9b886cb81
Parents: fd35311
Author: Kate Ting <ka...@apache.org>
Authored: Sat Jun 15 15:27:50 2013 -0400
Committer: Kate Ting <ka...@apache.org>
Committed: Sat Jun 15 15:27:50 2013 -0400
----------------------------------------------------------------------
execution/mapreduce/pom.xml | 16 +++++++++++++++-
.../java/org/apache/sqoop/job/TestHdfsExtract.java | 2 +-
.../java/org/apache/sqoop/job/TestHdfsLoad.java | 2 +-
3 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/c8b4581f/execution/mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/execution/mapreduce/pom.xml b/execution/mapreduce/pom.xml
index a6299e1..31da5f1 100644
--- a/execution/mapreduce/pom.xml
+++ b/execution/mapreduce/pom.xml
@@ -51,8 +51,8 @@ limitations under the License.
</dependencies>
- <!-- Add classifier name to the JAR name -->
<build>
+ <!-- Add classifier name to the JAR name -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -62,6 +62,20 @@ limitations under the License.
<classifier>hadoop${hadoop.profile}</classifier>
</configuration>
</plugin>
+
+ <!--
+ Propagate our build directory to the tests
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <maven.build.directory>${project.build.directory}</maven.build.directory>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/sqoop/blob/c8b4581f/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsExtract.java
----------------------------------------------------------------------
diff --git a/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsExtract.java b/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsExtract.java
index b3e6050..58c3068 100644
--- a/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsExtract.java
+++ b/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsExtract.java
@@ -47,7 +47,7 @@ import org.junit.Test;
public class TestHdfsExtract extends TestCase {
- private static final String INPUT_ROOT = "/tmp/sqoop/warehouse/";
+ private static final String INPUT_ROOT = System.getProperty("maven.build.directory", "/tmp") + "/sqoop/warehouse/";
private static final int NUMBER_OF_FILES = 5;
private static final int NUMBER_OF_ROWS_PER_FILE = 1000;
http://git-wip-us.apache.org/repos/asf/sqoop/blob/c8b4581f/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsLoad.java
----------------------------------------------------------------------
diff --git a/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsLoad.java b/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsLoad.java
index 14591b4..b9b0631 100644
--- a/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsLoad.java
+++ b/execution/mapreduce/src/test/java/org/apache/sqoop/job/TestHdfsLoad.java
@@ -46,7 +46,7 @@ import org.apache.sqoop.job.mr.SqoopFileOutputFormat;
public class TestHdfsLoad extends TestCase {
- private static final String OUTPUT_ROOT = "/tmp/sqoop/warehouse/";
+ private static final String OUTPUT_ROOT = System.getProperty("maven.build.directory", "/tmp") + "/sqoop/warehouse/";
private static final String OUTPUT_FILE = "part-r-00000";
private static final int START_ID = 1;
private static final int NUMBER_OF_IDS = 9;