Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E11C200BC7 for ; Fri, 11 Nov 2016 03:34:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3BF82160B10; Fri, 11 Nov 2016 02:34:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 83161160B01 for ; Fri, 11 Nov 2016 03:34:03 +0100 (CET) Received: (qmail 20534 invoked by uid 500); 11 Nov 2016 02:34:02 -0000 Mailing-List: contact commits-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list commits@asterixdb.apache.org Received: (qmail 20524 invoked by uid 99); 11 Nov 2016 02:34:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 02:34:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 87652E00E5; Fri, 11 Nov 2016 02:34:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mblow@apache.org To: commits@asterixdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: asterixdb git commit: Wait For NC Processes To Exit Before Sanity Check Date: Fri, 11 Nov 2016 02:34:02 +0000 (UTC) archived-at: Fri, 11 Nov 2016 02:34:04 -0000 Repository: asterixdb Updated Branches: refs/heads/master f40081f5a -> 35a376ab0 Wait For NC Processes To Exit Before Sanity Check Wait for NCService / NCDriver processes to exit (or timeout to exhaust) before checking for extraneous processes. Otherwise, a false-positive may be reported. Change-Id: I35ebad976fa49d308843aee784ceacff5850bd11 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1348 Sonar-Qube: Jenkins Tested-by: Jenkins Reviewed-by: Till Westmann Integration-Tests: Jenkins Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/35a376ab Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/35a376ab Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/35a376ab Branch: refs/heads/master Commit: 35a376ab0e630a09c077f05d4e745d69e553ed26 Parents: f40081f Author: Michael Blow Authored: Thu Nov 10 16:24:58 2016 -0500 Committer: Michael Blow Committed: Thu Nov 10 18:33:33 2016 -0800 ---------------------------------------------------------------------- .../src/main/samples/local/bin/stop-sample-cluster.bat | 9 +++++++-- .../src/main/samples/local/bin/stop-sample-cluster.sh | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/35a376ab/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat index 0971065..7ac9483 100644 --- a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat +++ b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.bat @@ -89,9 +89,9 @@ echo INFO: Waiting up for cluster to shutdown... set tries=0 :wait_loop set /A tries=%tries% + 1 -if "%tries%" == "60" goto :post_shutdown +if "%tries%" == "60" goto :timed_out wmic process where ^ - "name='java.exe' and CommandLine like '%%org.codehaus.mojo.appassembler.booter.AppassemblerBooter%%' and CommandLine like '%%app.name=\"%%cc\"%%'" ^ + "name='java.exe' and CommandLine like '%%org.codehaus.mojo.appassembler.booter.AppassemblerBooter%%' and (CommandLine like '%%app.name=\"%%[cn]c\"%%' or CommandLine like '%%app.name=\"%%ncservice\"%%')" ^ GET processid >%tempfile% 2>/dev/null set found= @@ -100,6 +100,11 @@ if "%found%" == "1" ( timeout /T 1 /NOBREAK >/dev/null goto :wait_loop ) +goto :post_shutdown + +:timed_out +echo timed out! + :post_shutdown echo. http://git-wip-us.apache.org/repos/asf/asterixdb/blob/35a376ab/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh index f6824c8..7ee5fdf 100755 --- a/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh +++ b/asterixdb/asterix-server/src/main/samples/local/bin/stop-sample-cluster.sh @@ -62,7 +62,11 @@ if [ $? -ne 1 ]; then first=1 tries=0 echo -n "INFO: Waiting up to 60s for cluster to shutdown" - while [ -n "$($JAVA_HOME/bin/jps | awk '/CCDriver/')" -a $tries -lt 60 ]; do + while [ -n "$($JAVA_HOME/bin/jps | awk '/ (CCDriver|NCDriver|NCService)$/')" ]; do + if [ $tries -ge 60 ]; then + echo "...timed out!" + break + fi sleep 1s echo -n . tries=$(expr $tries + 1)