You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by el...@apache.org on 2017/09/14 19:05:05 UTC

[3/4] phoenix git commit: PHOENIX-4207 Improve zombie-test detection in test-patch.sh

PHOENIX-4207 Improve zombie-test detection in test-patch.sh


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

Branch: refs/heads/4.x-HBase-1.1
Commit: a561147571052c6ebdca38031f643c5a9a570398
Parents: fcb2dde
Author: Josh Elser <el...@apache.org>
Authored: Wed Sep 13 17:49:06 2017 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Sep 14 15:04:19 2017 -0400

----------------------------------------------------------------------
 dev/test-patch.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a5611475/dev/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev/test-patch.sh b/dev/test-patch.sh
index b2c0fa1..a1161fb 100755
--- a/dev/test-patch.sh
+++ b/dev/test-patch.sh
@@ -899,23 +899,23 @@ 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=`jps -m | grep surefirebooter | grep "phoenix-.*/target" | wc -l`
   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=`jps -m | grep surefirebooter | grep "phoenix-.*/target" | 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
+      ZB_STACK=`jps -m | grep surefirebooter | grep "phoenix-.*/target" | cut -d ' ' -f 1 | xargs -n 1 jstack | grep ".test" | grep "\.java"`
+      jps -m | grep surefirebooter | grep "phoenix-.*/target" | 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 -m | grep surefirebooter | grep "phoenix-.*/target" | 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