HBASE-7350 - Flakey tests make CI unreliable - addendum on the zombie detection
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1425463 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fac4877d3
commit
17ab8864c6
|
@ -621,16 +621,25 @@ runTests () {
|
|||
fi
|
||||
ZOMBIE_TESTS_COUNT=`jps | grep surefirebooter | wc -l`
|
||||
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"
|
||||
jps | grep surefirebooter | cut -d ' ' -f 1 | xargs -n 1 jstack | grep ".test" | grep "\.java"
|
||||
echo "************ END zombies jstack extract"
|
||||
JIRA_COMMENT="$JIRA_COMMENT
|
||||
#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`
|
||||
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
|
||||
echo "************ END zombies jstack extract"
|
||||
JIRA_COMMENT="$JIRA_COMMENT
|
||||
|
||||
{color:red}-1 core zombie tests{color}. There are zombie tests. See build logs for details."
|
||||
BAD=1
|
||||
{color:red}-1 core zombie tests{color}. There are ${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"
|
||||
fi
|
||||
else
|
||||
echo "We're ok: there is no zombie tests"
|
||||
echo "We're ok: there is no zombie test"
|
||||
fi
|
||||
return $BAD
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue