diff --git a/test/signal.sh b/test/signal.sh index 41e3088c..20a01f87 100644 --- a/test/signal.sh +++ b/test/signal.sh @@ -69,6 +69,7 @@ cat /dev/null > $OUT_LOG $pm2 sendSignal SIGUSR2 signal.js +sleep 1 OUT=`grep "SIGUSR2" "$OUT_LOG" | wc -l` [ $OUT -eq 2 ] || fail "Signal not received by the process name" success "Processes sucessfully receives the signal" @@ -77,6 +78,8 @@ $pm2 stop signal.js # Send a process by id $pm2 start signal.js + +sleep 1 # get the log file and the id. OUT_LOG=`$pm2 prettylist | grep -m 1 -E "pm_out_log_path:" | sed "s/.*'\([^']*\)',/\1/"` ID=`$pm2 prettylist | grep -E "pm_id:" | sed "s/.*pm_id: \([^,]*\),/\1/"`