hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-14349 pre-commit zombie finder is overly broad
Date Wed, 07 Oct 2015 20:41:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 4e876c59f -> e1fd3526b


HBASE-14349 pre-commit zombie finder is overly broad


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e1fd3526
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e1fd3526
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e1fd3526

Branch: refs/heads/master
Commit: e1fd3526b130d669ad02e2c55a91299f0bd4c15d
Parents: 4e876c5
Author: stack <stack@apache.org>
Authored: Wed Oct 7 13:41:27 2015 -0700
Committer: stack <stack@apache.org>
Committed: Wed Oct 7 13:41:27 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 22 +++++++++++++---------
 pom.xml                   |  4 +++-
 2 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e1fd3526/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index d3704bb..a781b80 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -833,6 +833,12 @@ checkLineLengths () {
   return 0
 }
 
+zombieCount() {
+  # HBase tests have been flagged with an innocuous '-Dhbase.test' just so they can
+  # be identified as hbase in a process listing.
+  echo `jps -v | grep -e surefirebooter -e '-Dhbase.test' | wc -l`
+}
+
 ###############################################################################
 ### Run the tests
 runTests () {
@@ -846,10 +852,6 @@ runTests () {
   echo ""
   echo ""
 
-
-  ### kill any process remaining from another test, maybe even another project
-  jps | grep surefirebooter | cut -d ' ' -f 1 | xargs kill -9 2>/dev/null
-  
   failed_tests=""
   ### Kill any rogue build processes from the last attempt
   condemnedCount=`$PS auxwww | $GREP ${PROJECT_NAME}PatchProcess | $AWK '{print $2}' | $AWK
'BEGIN {total = 0} {total += 1} END {print total}'`
@@ -874,23 +876,25 @@ runTests () {
     {color:green}+1 core tests{color}.  The patch passed unit tests in $modules."
     BAD=0
   fi
-  ZOMBIE_TESTS_COUNT=`jps | grep surefirebooter | wc -l`
+  ZOMBIE_TESTS_COUNT=`zombieCount`
   if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
     #It seems sometimes the tests are not dying immediately. Let's give them 30s
     echo "Suspicious java process found - waiting 30s to see if there are just slow to stop"
     sleep 30
-    ZOMBIE_TESTS_COUNT=`jps | grep surefirebooter | wc -l`
+    ZOMBIE_TESTS_COUNT=`zombieCount`
     if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
       echo "There are $ZOMBIE_TESTS_COUNT zombie tests, they should have been killed by surefire
but survived"
       echo "************ BEGIN zombies jstack extract"
-      ZB_STACK=`jps | grep surefirebooter | cut -d ' ' -f 1 | xargs -n 1 jstack | grep ".test"
| grep "\.java"`
-      jps | grep surefirebooter | cut -d ' ' -f 1 | xargs -n 1 jstack
+      # HBase tests have been flagged with an innocuous '-Dhbase.test' just so they can
+      # be identified as hbase in a process listing.
+      ZB_STACK=`jps -v | grep -e surefirebooter -e '-Dhbase.test' | cut -d ' ' -f 1 | xargs
-n 1 jstack | grep ".test" | grep "\.java"`
+      jps -v | grep -e surefirebooter -e '-Dhbase.test' | cut -d ' ' -f 1 | xargs -n 1 jstack
       echo "************ END  zombies jstack extract"
       JIRA_COMMENT="$JIRA_COMMENT
 
      {color:red}-1 core zombie tests{color}.  There are ${ZOMBIE_TESTS_COUNT} zombie test(s):
${ZB_STACK}"
       BAD=1
-      jps | grep surefirebooter | cut -d ' ' -f 1 | xargs kill -9
+      jps -v | grep -e surefirebooter -e '-Dhbase.test' | cut -d ' ' -f 1 | xargs kill -9
     else
       echo "We're ok: there is no zombie test, but some tests took some time to stop"
     fi

http://git-wip-us.apache.org/repos/asf/hbase/blob/e1fd3526/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 948e319..c9fc6a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1292,7 +1292,9 @@
     <!-- default Xmx value is 2800m. Use -Dsurefire.Xmx=xxg to run tests with different
JVM Xmx value -->
     <surefire.Xmx>2800m</surefire.Xmx>
     <surefire.cygwinXmx>2800m</surefire.cygwinXmx>
-    <hbase-surefire.argLine>-enableassertions -XX:MaxDirectMemorySize=1G -Xmx${surefire.Xmx}
+    <!--Mark our test runs with '-Dhbase.test' so we can identify a surefire test as ours
in a process listing
+     -->
+    <hbase-surefire.argLine>-enableassertions -Dhbase.test -Xmx${surefire.Xmx}
       -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true
       -Djava.awt.headless=true
     </hbase-surefire.argLine>


Mime
View raw message