You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2015/01/23 21:25:47 UTC
sqoop git commit: SQOOP-1991: Sqoop2: Define slow category in
integration tests
Repository: sqoop
Updated Branches:
refs/heads/sqoop2 c8dbec481 -> 21a44fc15
SQOOP-1991: Sqoop2: Define slow category in integration tests
(Abraham Elmahrek via Jarek Jarcec Cecho)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/21a44fc1
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/21a44fc1
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/21a44fc1
Branch: refs/heads/sqoop2
Commit: 21a44fc15bf4c31e1e54388f79b6eb76c10bb4d2
Parents: c8dbec4
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Fri Jan 23 12:25:10 2015 -0800
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Fri Jan 23 12:25:10 2015 -0800
----------------------------------------------------------------------
dev-support/test-patch.py | 28 +++++++++++++++++++---------
pom.xml | 32 ++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/21a44fc1/dev-support/test-patch.py
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py
index 6b0218b..5d61576 100755
--- a/dev-support/test-patch.py
+++ b/dev-support/test-patch.py
@@ -255,18 +255,26 @@ def find_all_files(top):
for f in files:
yield os.path.join(root, f)
-def mvn_test(result, output_dir):
- run_mvn_test("test", "unit", result, output_dir)
+def mvn_test(result, output_dir, slow):
+ run_mvn_test("test", "unit", result, output_dir, slow)
-def mvn_integration(result, output_dir):
- run_mvn_test("integration-test -pl test", "integration", result, output_dir)
+def mvn_integration(result, output_dir, slow):
+ run_mvn_test("integration-test -pl test", "integration", result, output_dir, slow)
-def run_mvn_test(command, test_type, result, output_dir):
- rc = execute("mvn %s 1>%s/test_%s.txt 2>&1" % (command, output_dir, test_type))
+def run_mvn_test(command, test_type, result, output_dir, slow):
+ if slow:
+ command += " -Pslow,hadoop200"
+ test_file_name = "%s_slow" % test_type
+ test_type = "slow %s" % test_type
+ else:
+ test_file_name = "%s_fast" % test_type
+ test_type = "fast %s" % test_type
+
+ rc = execute("mvn %s 1>%s/test_%s.txt 2>&1" % (command, output_dir, test_file_name))
if rc == 0:
result.success("All %s tests passed" % test_type)
else:
- result.error("Some %s tests failed (%s)" % (test_type, jenkins_file_link_for_jira("report", "test_%s.txt" % test_type)))
+ result.error("Some %s tests failed (%s)" % (test_type, jenkins_file_link_for_jira("report", "test_%s.txt" % test_file_name)))
failed_tests = []
for path in list(find_all_files(".")):
file_name = os.path.basename(path)
@@ -449,8 +457,10 @@ static_test(result, patch_file, output_dir)
mvn_rat(result, output_dir)
mvn_install(result, output_dir)
if run_tests:
- mvn_test(result, output_dir)
- mvn_integration(result, output_dir)
+ mvn_test(result, output_dir, slow=False)
+ mvn_test(result, output_dir, slow=True)
+ mvn_integration(result, output_dir, slow=False)
+ mvn_integration(result, output_dir, slow=True)
else:
result.info("patch applied and built but tests did not execute")
http://git-wip-us.apache.org/repos/asf/sqoop/blob/21a44fc1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 66451e7..829255c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -138,6 +138,10 @@ limitations under the License.
<profile>
<id>fast</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
<build>
<plugins>
<plugin>
@@ -147,6 +151,14 @@ limitations under the License.
<excludedGroups>slow</excludedGroups>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <excludedGroups>slow</excludedGroups>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
@@ -154,6 +166,12 @@ limitations under the License.
<profile>
<id>slow</id>
+ <activation>
+ <property>
+ <name>slow</name>
+ </property>
+ </activation>
+
<build>
<plugins>
<plugin>
@@ -163,6 +181,14 @@ limitations under the License.
<groups>slow</groups>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <groups>slow</groups>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
@@ -687,6 +713,12 @@ limitations under the License.
</properties>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.18.1</version>
+ </plugin>
</plugins>
</pluginManagement>