hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1344558 - in /hbase/trunk: hbase-common/pom.xml hbase-server/pom.xml hbase-server/src/test/java/org/apache/hadoop/hbase/util/HBaseHomePath.java hbase-site/src/docbkx/developer.xml pom.xml
Date Thu, 31 May 2012 04:23:21 GMT
Author: stack
Date: Thu May 31 04:23:20 2012
New Revision: 1344558

URL: http://svn.apache.org/viewvc?rev=1344558&view=rev
HBASE-6087 Add hbase-common module: ADDENDUM


Modified: hbase/trunk/hbase-common/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/pom.xml?rev=1344558&r1=1344557&r2=1344558&view=diff
--- hbase/trunk/hbase-common/pom.xml (original)
+++ hbase/trunk/hbase-common/pom.xml Thu May 31 04:23:20 2012
@@ -67,7 +67,20 @@
-  <!-- profile against Hadoop 1.0.x: This is the default. It has to have the same
+    <!-- Skip the tests in this module -->
+    <profile>
+      <id>skip-common-tests</id>
+      <activation>
+        <property>
+          <name>skip-common-tests</name>
+        </property>
+      </activation>
+      <properties>
+        <surefire.skipFirstPart>true</surefire.skipFirstPart>
+      </properties>
+    </profile>
+    <!-- profile against Hadoop 1.0.x: This is the default. It has to have the same
     activation property as the parent Hadoop 1.0.x profile to make sure it gets run at
     the same time. -->

Modified: hbase/trunk/hbase-server/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/pom.xml?rev=1344558&r1=1344557&r2=1344558&view=diff
--- hbase/trunk/hbase-server/pom.xml (original)
+++ hbase/trunk/hbase-server/pom.xml Thu May 31 04:23:20 2012
@@ -465,6 +465,20 @@
+    <!-- Skip the tests in this module -->
+    <profile>
+      <id>skip-server-tests</id>
+      <activation>
+        <property>
+          <name>skip-server-tests</name>
+        </property>
+      </activation>
+      <properties>
+        <surefire.skipFirstPart>true</surefire.skipFirstPart>
+        <surefire.skipSecondPart>true</surefire.skipSecondPart>
+      </properties>
+    </profile>
     <!-- Special builds -->

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/HBaseHomePath.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/HBaseHomePath.java?rev=1344558&r1=1344557&r2=1344558&view=diff
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/HBaseHomePath.java
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/HBaseHomePath.java
Thu May 31 04:23:20 2012
@@ -18,7 +18,7 @@ package org.apache.hadoop.hbase.util;
 import java.net.URL;
-import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.master.HMaster;
 /** Determines HBase home path from either class or jar directory */
 public class HBaseHomePath {
@@ -31,7 +31,7 @@ public class HBaseHomePath {
   public static String getHomePath() {
-    String className = HConstants.class.getName();  // This could have been any HBase class.
+    String className = HMaster.class.getName();  // This could have been any HBase class.
     String relPathForClass = className.replace(".", "/") + ".class";
     URL url = ClassLoader.getSystemResource(relPathForClass);
     relPathForClass = "/" + relPathForClass;

Modified: hbase/trunk/hbase-site/src/docbkx/developer.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-site/src/docbkx/developer.xml?rev=1344558&r1=1344557&r2=1344558&view=diff
--- hbase/trunk/hbase-site/src/docbkx/developer.xml (original)
+++ hbase/trunk/hbase-site/src/docbkx/developer.xml Thu May 31 04:23:20 2012
@@ -276,18 +276,37 @@ What is the new development version for 
     <section xml:id="hbase.tests">
-<para>HBase tests are divided into two groups: <xref linkend="hbase.unittests"/>
-<xref linkend="integration.tests" /> (As of this writing, Integration tests are little
-Unit tests are run by the Apache Continuous Integration server, Jenkins at
-builds.apache.org, and by developers when they are verifying a fix does not cause breakage
elsewhere in the code base.
-Integration tests are generally long-running tests that are invoked out-of-bound of
-the CI server when you want to do more intensive testing beyond the unit test set.
-Integration tests, for example, are run proving a release candidate or a production
-deploy. Below we go into more detail on each of these test types.  Developers at a
-minimum should familiarize themselves with the unit test detail; unit tests in
+<para> Developers, at a minimum, should familiarize themselves with the unit test detail;
unit tests in
 HBase have a character not usually seen in other projects.</para> 
+<section xml:id="hbase.moduletests">
+<title>HBase Modules</title>
+<para>As of 0.96, HBase is split into multiple modules which creates "interesting"
rules for
+how and where tests are written. If you are writting code for <classname>hbase-server</classname>,
+<xref linkend="hbase.unittests"/> for how to write your tests; these tests can spin
+up a minicluster and will need to be categorized. For any other module, for example
+<classname>hbase-common</classname>, the tests must be strict unit tests and
just test the class
+under test - no use of the HBaseTestingUtility or minicluster is allowed (or even possible
+given the dependency tree).</para>
+  <section xml:id="hbase.moduletest.run">
+  <title>Running Tests in other Modules</title>
+  If the module you are developing in has no other dependencies on other HBase modules, then
+  you can cd into that module and just run:
+  <programlisting>mvn test</programlisting>
+  which will just run the tests IN THAT MODULE. If there are other dependencies on other
+  then you will have run the command from the ROOT HBASE DIRECTORY. This will run the tests
in the other
+  modules, unless you specify to skip the tests in that module. For instance, to skip the
tests in the hbase-server module,
+  you would run:
+  <programlisting>mvn clean test -Dskip-server-tests</programlisting>
+  from the top level directory to run all the tests in modules other than hbase-server. Note
that you
+  can specify to skip tests in multiple modules as well as just for a single module. For
example, to skip
+  the tests in <classname>hbase-server</classname> and <classname>hbase-common</classname>,
you would run:
+  <programlisting>mvn clean test -Dskip-server-tests -Dskip-common-tests</programlisting>
+  <para>Also, keep in mind that if you are running tests in the <classname>hbase-server</classname>
module you will need to 
+  apply the maven profiles discussed in <xref linkend="hbase.unittests.cmds"/> to get
the tests to run properly.</para>
+  </section>
 <section xml:id="hbase.unittests">
 <title>Unit Tests</title>
 <para>HBase unit tests are subdivided into three categories: small, medium and large,
@@ -333,8 +352,7 @@ individually. They can use a cluster, an
 <section xml:id="hbase.unittests.large">
 <para><emphasis>Large</emphasis> tests are everything else. They are typically
-tests (yes, some large tests should be moved out to be HBase <xref linkend="integration.tests"
-regression tests for specific bugs, timeout tests, performance tests.
+tests, regression tests for specific bugs, timeout tests, performance tests.
 They are executed before a commit on the pre-integration machines. They can be run on
 the developer machine as well.
@@ -491,12 +509,6 @@ mvn compile
           above in <xref linkend="hbase.unittests" /></para>
-       <section xml:id="maven.build.commanas.integration.tests"> 
-          <title>Running all or individual Integration Tests</title>
-          <para>See <xref linkend="integration.tests" />
-          </para>
-      </section>
        <section xml:id="maven.build.hadoop"> 
           <title>Building against various hadoop versions.</title>
           <para>As of 0.96, HBase supports building against hadoop versions: 1.0.3,
2.0.0-alpha and 3.0.0-SNAPSHOT. 

Modified: hbase/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/pom.xml?rev=1344558&r1=1344557&r2=1344558&view=diff
--- hbase/trunk/pom.xml (original)
+++ hbase/trunk/pom.xml Thu May 31 04:23:20 2012
@@ -426,6 +426,7 @@
           <!-- Generic testing configuration for all packages -->
+            <failIfNoTests>false</failIfNoTests>

View raw message