incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1435040 - in /incubator/hcatalog/trunk: CHANGES.txt src/test/e2e/templeton/README.txt src/test/e2e/templeton/build.xml src/test/e2e/templeton/tests/ddl.conf webhcat/svr/src/main/config/webhcat-default.xml
Date Fri, 18 Jan 2013 06:32:21 GMT
Author: gates
Date: Fri Jan 18 06:32:21 2013
New Revision: 1435040

URL: http://svn.apache.org/viewvc?rev=1435040&view=rev
Log:
HCATALOG-593 webhcat system tests don't work as per the instructions

Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/src/test/e2e/templeton/README.txt
    incubator/hcatalog/trunk/src/test/e2e/templeton/build.xml
    incubator/hcatalog/trunk/src/test/e2e/templeton/tests/ddl.conf
    incubator/hcatalog/trunk/webhcat/svr/src/main/config/webhcat-default.xml

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1435040&r1=1435039&r2=1435040&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Fri Jan 18 06:32:21 2013
@@ -176,6 +176,8 @@ Release 0.5.0 - Unreleased
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-593 webhcat system tests don't work as per the instructions (thejas via gates)
+
   HCAT-596 fix releaseaudit and automate running (traviscrawford)
 
   HCAT-587 webhcat controller map task takes too much memory (thejas via traviscrawford)

Modified: incubator/hcatalog/trunk/src/test/e2e/templeton/README.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/README.txt?rev=1435040&r1=1435039&r2=1435040&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/README.txt (original)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/README.txt Fri Jan 18 06:32:21 2013
@@ -20,6 +20,11 @@ End to end tests
 End to end tests in templeton runs tests against an existing templeton server.
 It runs hcat, mapreduce, streaming, hive and pig tests.
 
+!!!! NOTE !!!!
+--------------
+USE SVN TO CHECKOUT CODE FOR RUNNING TESTS AS THE TEST
+  HARNESS IS EXTERNED FROM PIG. GIT WILL NOT IMPORT IT
+
 Test cases
 ----------
 The tests are defined in src/test/e2e/templeton/tests/*.conf
@@ -43,6 +48,7 @@ Setup
 * Data::Compare
 * File::Find::Rule
 * HTTP::Daemon
+* Parallel::ForkManager
 
 Tips:
 * Using perlbrew (http://perlbrew.pl) should make installing perl modules easier. 
@@ -52,6 +58,10 @@ Tips:
 
 3. Copy contents of src/test/e2e/templeton/inpdir to hdfs
 
+4. You will need to two jars in the same HDFS directory as the contents of inpdir.  piggybank.jar,
which can
+be obtained from Pig.  The second is the hadoop-examples.jar, which can be obtained from
your Hadoop distribution.
+This should be called hexamples.jar when it is uploaded to HDFS.
+
 
 Running the tests
 -----------------

Modified: incubator/hcatalog/trunk/src/test/e2e/templeton/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/build.xml?rev=1435040&r1=1435039&r2=1435040&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/build.xml (original)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/build.xml Fri Jan 18 06:32:21 2013
@@ -20,14 +20,16 @@
 <project name="TestHarnessTempletonTests" default="test">
 
     <!-- Separate property name for udfs' build.xml -->
-    <property name="e2e.lib.dir" value="${basedir}/lib"/>
 
     <property name="test.src" value="${basedir}/tests"/>
     <property name="driver.src" value="${basedir}/drivers"/>
+    <property name="conf.src" value="${basedir}/conf"/>
     <property name="harness.dir" value="${basedir}/../harness"/>
+    <property name="harness.tar" value="${harness.dir}/harness.tar"/>
     <property name="inpdir.local" value="${basedir}/inpdir/"/>
-    <property name="test.location" value="${basedir}/testWorkDir"/>
-    <property name="driver.src" value="${basedir}/drivers"/>
+    <property name="tar.name" value="${basedir}/hcattests.tar"/>
+    <property name="tar.dir" value="${basedir}/tar"/>
+    <property name="test.location" value="${basedir}/testdist"/>
 
     <!-- Check that the necessary properties are setup -->
     <target name="property-check">
@@ -39,16 +41,45 @@
               unless="inpdir.hdfs"/>
     </target>
 
+    <!-- Get the tarball for the harness -->
+    <target name="build-harness">
+        <ant dir="${harness.dir}" inheritAll="false"/>
+    </target>
+
+    <!-- Build an archive to use in the tests -->
+    <target name="tar" description="Create tar file with hcat modules">
+        <mkdir dir="${tar.dir}"/>
+        <mkdir dir="${tar.dir}/tests"/>
+        <mkdir dir="${tar.dir}/conf"/>
+        <copy todir="${tar.dir}/tests">
+            <fileset dir="${test.src}">
+            </fileset>
+        </copy>
+        <copy todir="${tar.dir}">
+            <fileset dir="${driver.src}"/>
+        </copy>
+        <copy todir="${tar.dir}/conf">
+            <fileset dir="${conf.src}"/>
+        </copy>
+        <tar destfile="${tar.name}" basedir="${tar.dir}"/>
+    </target>
+
     <!-- Prep the test area -->
-    <target name="init-test">
+    <target name="init-test" depends="build-harness, tar">
         <mkdir dir="${test.location}"/>
+
+        <untar src="${tar.name}" dest="${test.location}"/>
+        <untar src="${harness.tar}" dest="${test.location}"/>
+
+        <chmod perm="ugo+x" type="file">
+            <fileset file="${test.location}/test_harness.pl"/>
+        </chmod>
     </target>
 
     <target name="test" depends="property-check, init-test">
         <property name="tests.to.run" value=""/>
-        <exec executable="${harness.dir}/test_harness.pl" dir="${test.location}" failonerror="true">
-            <env key="HARNESS_ROOT" value="${harness.dir}"/>
-            <env key="DRIVER_ROOT" value="${basedir}/drivers"/>
+        <exec executable="./test_harness.pl" dir="${test.location}" failonerror="true">
+            <env key="HARNESS_ROOT" value="."/>
             <env key="TH_WORKING_DIR" value="${test.location}"/>
             <env key="TH_INPDIR_LOCAL" value="${inpdir.local}"/>
             <env key="TH_INPDIR_HDFS" value="${inpdir.hdfs}"/>
@@ -70,7 +101,6 @@
         <property name="tests.to.run" value=""/>
         <exec executable="${harness.dir}/test_harness.pl" dir="${test.location}" failonerror="true">
             <env key="HARNESS_ROOT" value="${harness.dir}"/>
-            <env key="DRIVER_ROOT" value="${basedir}/drivers"/>
             <env key="TH_WORKING_DIR" value="${test.location}"/>
             <env key="TH_INPDIR_LOCAL" value="${inpdir.local}"/>
             <env key="TH_INPDIR_HDFS" value="${inpdir.hdfs}"/>
@@ -90,7 +120,10 @@
         </exec>
     </target>
 
+    <target name="clean">
+        <delete dir="${test.location}"/>
+        <delete file="${tar.name}"/>
+        <delete dir="${tar.dir}"/>
+    </target>
 
 </project>
-
-

Modified: incubator/hcatalog/trunk/src/test/e2e/templeton/tests/ddl.conf
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/tests/ddl.conf?rev=1435040&r1=1435039&r2=1435040&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/tests/ddl.conf (original)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/tests/ddl.conf Fri Jan 18 06:32:21 2013
@@ -73,7 +73,7 @@ $cfg = 
      'url' => ':TEMPLETON_URL:/templeton/v1/ddl',
      'status_code' => 200,
      'post_options' => ['user.name=:UNAME:','exec=create table templetontest_tab2(i int,
j bigint) STORED AS rcfile;'],
-     'json_field_substr_match' => { 'exitcode' => '^9$'}
+     'json_field_substr_match' => { 'exitcode' => '^1$'}
     },
     {
                                 #describe table
@@ -732,7 +732,7 @@ STORED AS rcfile
      'num' => 11,
      'method' => 'GET',
      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/templetontest_parts/partition/dt=%2720120101%27,country=%27IN%27?user.name=:UNAME:',
-     'status_code' => 500, #should return 404 when bug is fixed
+     'status_code' => 404,
      'json_field_substr_match' => 
        {
         'error' => 'Partition.*for table templetontest_parts does not exist'

Modified: incubator/hcatalog/trunk/webhcat/svr/src/main/config/webhcat-default.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/src/main/config/webhcat-default.xml?rev=1435040&r1=1435039&r2=1435040&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/src/main/config/webhcat-default.xml (original)
+++ incubator/hcatalog/trunk/webhcat/svr/src/main/config/webhcat-default.xml Fri Jan 18 06:32:21
2013
@@ -39,7 +39,7 @@
 
   <property>
     <name>templeton.jar</name>
-    <value>${env.TEMPLETON_HOME}/share/webhcat/svr/webhcat-0.5.0-SNAPSHOT.jar</value>
+    <value>${env.TEMPLETON_HOME}/share/webhcat/svr/webhcat-0.6.0-SNAPSHOT.jar</value>
     <description>The path to the Templeton jar file.</description>
   </property>
 



Mime
View raw message