hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r806558 - in /hadoop/mapreduce/trunk: CHANGES.txt src/contrib/sqoop/build.xml src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java
Date Fri, 21 Aug 2009 13:58:55 GMT
Author: tomwhite
Date: Fri Aug 21 13:58:55 2009
New Revision: 806558

URL: http://svn.apache.org/viewvc?rev=806558&view=rev
Log:
MAPREDUCE-749. Make Sqoop unit tests more Hudson-friendly. Contributed by Aaron Kimball.

Added:
    hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java
Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/sqoop/build.xml
    hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=806558&r1=806557&r2=806558&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Aug 21 13:58:55 2009
@@ -221,6 +221,9 @@
     MAPREDUCE-870. Remove the job retire thread and the associated 
     config parameters. (sharad)
 
+    MAPREDUCE-749. Make Sqoop unit tests more Hudson-friendly.
+    (Aaron Kimball via tomwhite)
+
   BUG FIXES
 
     MAPREDUCE-878. Rename fair scheduler design doc to 

Modified: hadoop/mapreduce/trunk/src/contrib/sqoop/build.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/build.xml?rev=806558&r1=806557&r2=806558&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/build.xml (original)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/build.xml Fri Aug 21 13:58:55 2009
@@ -25,6 +25,7 @@
 
   <import file="../build-contrib.xml"/>
   <property environment="env"/>
+  <property name="sqoop.thirdparty.lib.dir" value="" />
 
   <!-- ================================================================== -->
   <!-- Run unit tests                                                     -->
@@ -76,6 +77,11 @@
       -->
       <sysproperty key="sqoop.src.dir" value="${build.test}/data"/>
 
+      <!-- Override standalone Hadoop's working dirs to allow parallel
+           execution of multiple Hudson builders
+      -->
+      <sysproperty key="hadoop.tmp.dir" value="${build.test}/hadoop"/>
+
       <sysproperty key="fs.default.name" value="${fs.default.name}"/>
       <sysproperty key="hadoop.test.localoutputfile" value="${hadoop.test.localoutputfile}"/>
       <sysproperty key="hadoop.log.dir" value="${hadoop.log.dir}"/>
@@ -91,6 +97,8 @@
         <path refid="test.classpath"/>
         <path refid="contrib-classpath"/>
         <pathelement path="${env.JAVA_HOME}/lib/tools.jar" />
+        <fileset dir="${sqoop.thirdparty.lib.dir}"
+            includes="*.jar" />
       </classpath>
       <formatter type="${test.junit.output.format}" />
       <batchtest todir="${build.test}" unless="testcase">

Modified: hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java?rev=806558&r1=806557&r2=806558&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/AllTests.java
Fri Aug 21 13:58:55 2009
@@ -21,9 +21,6 @@
 import org.apache.hadoop.sqoop.hive.TestHiveImport;
 import org.apache.hadoop.sqoop.lib.TestFieldFormatter;
 import org.apache.hadoop.sqoop.lib.TestRecordParser;
-import org.apache.hadoop.sqoop.manager.LocalMySQLTest;
-import org.apache.hadoop.sqoop.manager.MySQLAuthTest;
-import org.apache.hadoop.sqoop.manager.OracleManagerTest;
 import org.apache.hadoop.sqoop.manager.TestHsqldbManager;
 import org.apache.hadoop.sqoop.manager.TestSqlManager;
 import org.apache.hadoop.sqoop.orm.TestClassWriter;
@@ -52,14 +49,12 @@
     suite.addTestSuite(TestMultiCols.class);
     suite.addTestSuite(TestOrderBy.class);
     suite.addTestSuite(TestWhere.class);
-    suite.addTestSuite(LocalMySQLTest.class);
-    suite.addTestSuite(MySQLAuthTest.class);
     suite.addTestSuite(TestHiveImport.class);
     suite.addTestSuite(TestRecordParser.class);
     suite.addTestSuite(TestFieldFormatter.class);
     suite.addTestSuite(TestImportOptions.class);
     suite.addTestSuite(TestParseMethods.class);
-    suite.addTestSuite(OracleManagerTest.class);
+    suite.addTest(ThirdPartyTests.suite());
 
     return suite;
   }

Added: hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java?rev=806558&view=auto
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java
(added)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/src/test/org/apache/hadoop/sqoop/ThirdPartyTests.java
Fri Aug 21 13:58:55 2009
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.sqoop;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.hadoop.sqoop.manager.LocalMySQLTest;
+import org.apache.hadoop.sqoop.manager.MySQLAuthTest;
+import org.apache.hadoop.sqoop.manager.OracleManagerTest;
+
+/**
+ * Test battery including all tests of vendor-specific ConnManager implementations.
+ * These tests likely aren't run by Apache Hudson, because they require configuring
+ * and using Oracle, MySQL, etc., which may have incompatible licenses with Apache.
+ */
+public final class ThirdPartyTests extends TestCase {
+
+  private ThirdPartyTests() { }
+
+  public static Test suite() {
+    TestSuite suite = new TestSuite("Tests vendor-specific ConnManager "
+      + "implementations in Sqoop");
+    suite.addTestSuite(LocalMySQLTest.class);
+    suite.addTestSuite(MySQLAuthTest.class);
+    suite.addTestSuite(OracleManagerTest.class);
+    
+    return suite;
+  }
+
+}
+



Mime
View raw message