Repository: hbase Updated Branches: refs/heads/branch-1 d79be59f8 -> c93639359
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/c9363935 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c9363935 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c9363935 Branch: refs/heads/branch-1 Commit: c936393591289d5c5868afcf5ae0236e69c357b8 Parents: d79be59 Author: stack <[email protected]> Authored: Wed Oct 7 13:41:27 2015 -0700 Committer: stack <[email protected]> Committed: Wed Oct 7 15:01:15 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/c9363935/dev-support/test-patch.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index e6a377a..bb26e95 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -707,6 +707,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 () { @@ -720,10 +726,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}'` @@ -748,23 +750,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/c9363935/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 9751762..8c96177 100644 --- a/pom.xml +++ b/pom.xml @@ -1217,7 +1217,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>
