Skip to content

Commit

Permalink
HBASE-14589 Looking for the surefire-killer; builds being killed...; …
Browse files Browse the repository at this point in the history
…ADDENDUM; purge killing of zombies; FIX complaint about grep device
  • Loading branch information
saintstack committed Nov 3, 2015
1 parent 870c74e commit 0eae729
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions dev-support/test-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ checkLineLengths () {
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 surefirebooter | grep '-Dhbase.test' | wc -l`
echo `jps -v | grep surefirebooter | grep -e '-Dhbase.test' | wc -l`
}

###############################################################################
Expand Down Expand Up @@ -872,8 +872,9 @@ runTests () {
{color:green}+1 core tests{color}. The patch passed unit tests in $modules."
BAD=0
fi
# NOTE!!!! The below code has been copied and pasted up into jenkins as an after-task
# for trunk builds. Make sure to update it too if you change the below.
# NOTE!!!! The below code has been copied and pasted up into jenkins as an post-build task.
# Make sure to update it too if you change the below (Or extract below into script to checkout
# to run post-build)
ZOMBIE_TESTS_COUNT=`zombieCount`
if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
# It seems sometimes the tests are not dying immediately. Let's give them 30s
Expand All @@ -882,16 +883,14 @@ runTests () {
ZOMBIE_TESTS_COUNT=`zombieCount`
if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
echo "There appear to be $ZOMBIE_TESTS_COUNT zombie tests, they should have been killed by surefire but survived"
echo "************ zombies jps listing"
jps -v | grep surefirebooter | grep '-Dhbase.test'
jps -v | grep surefirebooter | grep -e '-Dhbase.test'
echo "************ BEGIN zombies jstack extract"
# 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 surefirebooter | grep '-Dhbase.test' | cut -d ' ' -f 1 | xargs -n 1 jstack | grep ".test" | grep "\.java"`
jps -v | grep surefirebooter | grep '-Dhbase.test' | cut -d ' ' -f 1 | xargs -n 1 jstack
ZB_STACK=`jps -v | grep surefirebooter | grep -e '-Dhbase.test' | cut -d ' ' -f 1 | xargs -n 1 jstack | grep ".test" | grep "\.java"`
echo "************ END zombies jstack extract"
JIRA_COMMENT="$JIRA_COMMENT
{color:red}-1 core zombie tests{color}. There are possible ${ZOMBIE_TESTS_COUNT} zombie test(s): ${ZB_STACK}"
{color:red}-1 core zombie tests{color}. There are possible ${ZOMBIE_TESTS_COUNT} zombie test(s): ${ZB_STACK}"
BAD=1
else
echo "We're ok: there is no zombie test, but some tests took some time to stop"
Expand Down

0 comments on commit 0eae729

Please sign in to comment.