From 43dfd86e75cea26f25ed7e1f07eda4cd75ce83a5 Mon Sep 17 00:00:00 2001 From: tknew2 Date: Sun, 22 Dec 2013 17:08:32 +0100 Subject: [PATCH] slower test to let enough time for processing --- test/cli.sh | 10 ++++++---- test/fork.sh | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/cli.sh b/test/cli.sh index 18cf8f75..6891c30f 100755 --- a/test/cli.sh +++ b/test/cli.sh @@ -40,12 +40,16 @@ function success { } function spec { - [ $? -eq 0 ] || fail "$1" +PREV=$? +sleep 0.2 + [ $PREV -eq 0 ] || fail "$1" success "$1" } function ispec { - [ $? -eq 1 ] || fail "$1" +PREV=$? +sleep 0.2 + [ $PREV -eq 1 ] || fail "$1" success "$1" } @@ -55,9 +59,7 @@ echo -e "\033[1mRunning tests:\033[0m" echo "####################### DEBUG ############################" echo "PM2 Command = " $pm2 -echo "PM2 version = " $pm2 -V echo "Node version = " $nodeVersion - $node -e "var os = require('os'); console.log('arch : %s\nplatform : %s\nrelease : %s\ntype : %s\nmem : %d', os.arch(), os.platform(), os.release(), os.type(), os.totalmem())" echo "###################### !DEBUG! ###########################" diff --git a/test/fork.sh b/test/fork.sh index 44032736..6ed29d90 100644 --- a/test/fork.sh +++ b/test/fork.sh @@ -40,12 +40,16 @@ function success { } function spec { - [ $? -eq 0 ] || fail "$1" +PREV=$? +sleep 0.2 + [ $PREV -eq 0 ] || fail "$1" success "$1" } function ispec { - [ $? -eq 1 ] || fail "$1" +PREV=$? +sleep 0.2 + [ $PREV -eq 1 ] || fail "$1" success "$1" }