Skip to content

Instantly share code, notes, and snippets.

@Jokero
Created January 19, 2015 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jokero/e17552c67929dc1d05ad to your computer and use it in GitHub Desktop.
Save Jokero/e17552c67929dc1d05ad to your computer and use it in GitHub Desktop.
pm2 tests failed
> pm2@0.12.3 test /home/deployer/dev/pm2
> NODE_ENV=test bash test/index.sh && NODE_ENV=test bash test/main.sh
function fail {
echo -e "######## \033[31m ✘ $1\033[0m"
$pm2 kill
exit 1
}
function success {
echo -e "\033[32m------------> ✔ $1\033[0m"
$pm2 kill
}
function spec {
[ $? -eq 0 ] || fail "$1"
success "$1"
}
$pm2 kill
[PM2] Spawning PM2 daemon
[PM2] Success
[PM2] Stopping PM2...
[PM2] [WARN] No process found
[PM2] All processes has been stopped and deleted
[PM2] PM2 stopped
# if [ $TRAVIS ]
# then
# export DEBUG="pm2:*"
# fi
mocha ./test/programmatic/god.mocha.js
child_process: customFds option is deprecated, use stdio instead.
2015-01-19 13:02:34: [PM2][WORKER] Started with refreshing interval: 30000
2015-01-19 13:02:34:
2015-01-19 13:02:34: God
2015-01-19 13:02:34: No processes launched
2015-01-19 13:02:35: ✓ should have right properties
2015-01-19 13:02:35: ✓ should report pm2 version
2015-01-19 13:02:35: Special functions for God
2015-01-19 13:02:35: No processes launched
2015-01-19 13:02:36: Starting execution sequence in -cluster mode- for app name:echo id:0
2015-01-19 13:02:37: App name:echo id:0 online
2015-01-19 13:02:37: Starting execution sequence in -cluster mode- for app name:echo id:1
2015-01-19 13:02:37: App name:echo id:1 online
2015-01-19 13:02:37: App name:echo id:0 exited
2015-01-19 13:02:37: Process with pid 49205 killed
2015-01-19 13:02:37: App name:echo id:1 exited
2015-01-19 13:02:37: Process with pid 49214 killed
2015-01-19 13:02:38: ✓ should kill a process by name (1556ms)
2015-01-19 13:02:38: One process
2015-01-19 13:02:38: No processes launched
2015-01-19 13:02:39: Starting execution sequence in -cluster mode- for app name:echo id:2
2015-01-19 13:02:39: App name:echo id:2 online
2015-01-19 13:02:39: Starting execution sequence in -cluster mode- for app name:echo id:3
2015-01-19 13:02:39: App name:echo id:3 online
2015-01-19 13:02:39: ✓ should fork one process (228ms)
2015-01-19 13:02:39: Process State Machine
2015-01-19 13:02:39: Proc is not defined anymore or is being killed
2015-01-19 13:02:39: App name:echo id:2 exited
2015-01-19 13:02:39: Process with pid 49253 killed
2015-01-19 13:02:39: App name:echo id:3 exited
2015-01-19 13:02:39: Process with pid 49258 killed
2015-01-19 13:02:40: Starting execution sequence in -cluster mode- for app name:echo id:4
2015-01-19 13:02:41: App name:echo id:4 online
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:5
2015-01-19 13:02:41: App name:echo id:5 online
2015-01-19 13:02:41: ✓ should start a process (259ms)
2015-01-19 13:02:41: Proc is not defined anymore or is being killed
2015-01-19 13:02:41: App name:echo id:4 exited
2015-01-19 13:02:41: Process with pid 49297 killed
2015-01-19 13:02:41: ✓ should stop a process and keep in database on state stopped
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:4
2015-01-19 13:02:41: App name:echo id:4 online
2015-01-19 13:02:41: ✓ should restart the same process and set it as state online and be up
2015-01-19 13:02:41: Proc is not defined anymore or is being killed
2015-01-19 13:02:41: App name:echo id:4 exited
2015-01-19 13:02:41: Process with pid 49340 killed
2015-01-19 13:02:41: App name:echo id:5 exited
2015-01-19 13:02:41: Process with pid 49302 killed
2015-01-19 13:02:41: ✓ should stop this process by name and keep in db on state stopped (240ms)
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:4
2015-01-19 13:02:41: App name:echo id:4 online
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:5
2015-01-19 13:02:41: App name:echo id:5 online
2015-01-19 13:02:41: ✓ should restart the same process by NAME and set it as state online and be up (228ms)
2015-01-19 13:02:41: Proc is not defined anymore or is being killed
2015-01-19 13:02:41: App name:echo id:4 exited
2015-01-19 13:02:41: Process with pid 49351 killed
2015-01-19 13:02:41: ✓ should stop and delete a process id
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:6
2015-01-19 13:02:41: App name:echo id:6 online
2015-01-19 13:02:41: Starting execution sequence in -cluster mode- for app name:echo id:7
2015-01-19 13:02:41: App name:echo id:7 online
2015-01-19 13:02:42: App name:echo id:5 exited
2015-01-19 13:02:42: Process with pid 49356 killed
2015-01-19 13:02:42: App name:echo id:6 exited
2015-01-19 13:02:42: Process with pid 49394 killed
2015-01-19 13:02:42: App name:echo id:7 exited
2015-01-19 13:02:42: Process with pid 49399 killed
2015-01-19 13:02:42: ✓ should start stop and delete the process name from database (554ms)
2015-01-19 13:02:42: Reload - cluster
2015-01-19 13:02:42: No processes launched
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:43: App name:child id:8 online
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:43: App name:child id:9 online
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:43: App name:child id:10 online
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:43: App name:child id:8 exited
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:43: App name:child id:11 online
2015-01-19 13:02:43: App name:child id:9 exited
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:43: App name:child id:8 online
2015-01-19 13:02:43: App name:child id:10 exited
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:43: App name:child id:9 online
2015-01-19 13:02:43: 1) should launch app
2015-01-19 13:02:43: -reload- Creating a new process waiting for connections
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:43: App name:child id:10 online
2015-01-19 13:02:43: App name:child id:11 exited
2015-01-19 13:02:43: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:43: App name:child id:8 online
2015-01-19 13:02:43: App name:child id:11 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:9 online
2015-01-19 13:02:44: App name:child id:10 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:44: App name:child id:8 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:44: App name:child id:10 online
2015-01-19 13:02:44: App name:child id:11 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:44: App name:child id:8 online
2015-01-19 13:02:44: App name:child id:11 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:9 online
2015-01-19 13:02:44: App name:child id:10 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:44: App name:child id:8 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:44: App name:child id:10 online
2015-01-19 13:02:44: App name:child id:11 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:44: App name:child id:8 online
2015-01-19 13:02:44: App name:child id:11 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:9 online
2015-01-19 13:02:44: App name:child id:10 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:44: App name:child id:8 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:44: App name:child id:10 online
2015-01-19 13:02:44: App name:child id:11 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:44: App name:child id:8 online
2015-01-19 13:02:44: App name:child id:11 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:9 online
2015-01-19 13:02:44: App name:child id:10 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:44: App name:child id:8 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:44: App name:child id:10 online
2015-01-19 13:02:44: App name:child id:11 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:44: App name:child id:8 online
2015-01-19 13:02:44: App name:child id:11 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:9 online
2015-01-19 13:02:44: App name:child id:10 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:44: App name:child id:8 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:44: App name:child id:10 online
2015-01-19 13:02:44: App name:child id:11 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:44: App name:child id:8 online
2015-01-19 13:02:44: App name:child id:9 exited
2015-01-19 13:02:44: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:44: App name:child id:11 online
2015-01-19 13:02:45: App name:child id:9 online
2015-01-19 13:02:45: App name:child id:10 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:45: App name:child id:8 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:45: App name:child id:10 online
2015-01-19 13:02:45: App name:child id:11 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:45: App name:child id:8 online
2015-01-19 13:02:45: App name:child id:9 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:45: App name:child id:11 online
2015-01-19 13:02:45: App name:child id:9 online
2015-01-19 13:02:45: App name:child id:10 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:45: App name:child id:8 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:45: App name:child id:10 online
2015-01-19 13:02:45: App name:child id:11 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:45: App name:child id:8 online
2015-01-19 13:02:45: App name:child id:9 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:45: App name:child id:11 online
2015-01-19 13:02:45: App name:child id:9 online
2015-01-19 13:02:45: App name:child id:10 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:45: App name:child id:8 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:45: App name:child id:10 online
2015-01-19 13:02:45: App name:child id:11 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:45: App name:child id:8 online
2015-01-19 13:02:45: App name:child id:9 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:45: App name:child id:11 online
2015-01-19 13:02:45: App name:child id:9 online
2015-01-19 13:02:45: App name:child id:10 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:45: App name:child id:8 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:45: App name:child id:10 online
2015-01-19 13:02:45: App name:child id:11 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:45: App name:child id:8 online
2015-01-19 13:02:45: App name:child id:9 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:45: App name:child id:11 online
2015-01-19 13:02:45: App name:child id:9 online
2015-01-19 13:02:45: App name:child id:10 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:45: App name:child id:8 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:45: App name:child id:10 online
2015-01-19 13:02:45: App name:child id:8 online
2015-01-19 13:02:45: App name:child id:11 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:45: App name:child id:9 exited
2015-01-19 13:02:45: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:45: App name:child id:11 online
2015-01-19 13:02:46: App name:child id:9 online
2015-01-19 13:02:46: App name:child id:10 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:46: App name:child id:8 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:46: App name:child id:10 online
2015-01-19 13:02:46: App name:child id:8 online
2015-01-19 13:02:46: App name:child id:11 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:46: App name:child id:9 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:46: App name:child id:11 online
2015-01-19 13:02:46: App name:child id:9 online
2015-01-19 13:02:46: App name:child id:10 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:46: App name:child id:8 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:46: App name:child id:10 online
2015-01-19 13:02:46: App name:child id:8 online
2015-01-19 13:02:46: App name:child id:11 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:46: App name:child id:9 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:46: App name:child id:11 online
2015-01-19 13:02:46: App name:child id:9 online
2015-01-19 13:02:46: App name:child id:10 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:46: App name:child id:8 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:46: App name:child id:10 online
2015-01-19 13:02:46: App name:child id:8 online
2015-01-19 13:02:46: App name:child id:11 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:46: App name:child id:9 exited
2015-01-19 13:02:46: Script /home/deployer/dev/pm2/test/fixtures/child.js had too many unstable restarts (15). Stopped. "errored"
2015-01-19 13:02:46: App name:child id:11 online
2015-01-19 13:02:46: App name:child id:10 exited
2015-01-19 13:02:46: Script /home/deployer/dev/pm2/test/fixtures/child.js had too many unstable restarts (15). Stopped. "errored"
2015-01-19 13:02:46: App name:child id:8 exited
2015-01-19 13:02:46: Starting execution sequence in -cluster mode- for app name:child id:8
2015-01-19 13:02:46: App name:child id:8 online
2015-01-19 13:02:46: App name:child id:11 exited
2015-01-19 13:02:46: Script /home/deployer/dev/pm2/test/fixtures/child.js had too many unstable restarts (15). Stopped. "errored"
2015-01-19 13:02:46: App name:child id:8 exited
2015-01-19 13:02:46: Script /home/deployer/dev/pm2/test/fixtures/child.js had too many unstable restarts (15). Stopped. "errored"
2015-01-19 13:02:48: Error: channel closed
at ChildProcess.target.send (child_process.js:413:26)
at sendHelper (cluster.js:657:8)
at send (cluster.js:493:5)
at Worker.disconnect (cluster.js:400:5)
at null._onTimeout (/home/deployer/dev/pm2/lib/God/Reload.js:179:47)
at Timer.listOnTimeout (timers.js:133:15)
2015-01-19 13:02:48: Worker NaN is already disconnected
2015-01-19 13:02:48: Process with pid 49507 killed
2015-01-19 13:02:48: Process in a stopped status, starting it
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:9
2015-01-19 13:02:48: App name:child id:9 online
2015-01-19 13:02:48: Process in a stopped status, starting it
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:48: App name:child id:10 online
2015-01-19 13:02:48: Process in a stopped status, starting it
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:48: App name:child id:11 online
2015-01-19 13:02:48: 2) should restart the same process and set it as state online and be up
2015-01-19 13:02:48: Multi launching
2015-01-19 13:02:48: Error: channel closed
at ChildProcess.target.send (child_process.js:413:26)
at sendHelper (cluster.js:657:8)
at send (cluster.js:493:5)
at Worker.disconnect (cluster.js:400:5)
at null._onTimeout (/home/deployer/dev/pm2/lib/God/ActionMethods.js:231:16)
at Timer.listOnTimeout (timers.js:133:15)
2015-01-19 13:02:48: App name:child id:9 exited
2015-01-19 13:02:48: App name:child id:10 exited
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:48: Process with pid 50756 killed
2015-01-19 13:02:48: App name:child id:10 online
2015-01-19 13:02:48: App name:child id:11 exited
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:11
2015-01-19 13:02:48: App name:child id:10 exited
2015-01-19 13:02:48: Starting execution sequence in -cluster mode- for app name:child id:10
2015-01-19 13:02:48: App name:child id:11 online
2015-01-19 13:02:48: Process with pid 50820 killed
2015-01-19 13:02:48: App name:child id:10 online
2015-01-19 13:02:48: 3) "before all" hook
2015-01-19 13:02:48: 11 passing (14s)
2015-01-19 13:02:48: 3 failing
2015-01-19 13:02:48: 1) God Reload - cluster should launch app:
Uncaught AssertionError: expected 1 to equal 0
+ expected - actual
+0
-1
at Assertion.fail (/home/deployer/dev/pm2/node_modules/should/lib/assertion.js:199:17)
at Assertion.prop.(anonymous function) [as eql] (/home/deployer/dev/pm2/node_modules/should/lib/assertion.js:64:14)
at /home/deployer/dev/pm2/test/programmatic/god.mocha.js:216:46
at Array.forEach (native)
at null._onTimeout (/home/deployer/dev/pm2/test/programmatic/god.mocha.js:215:21)
at Timer.listOnTimeout (timers.js:133:15)
2015-01-19 13:02:48: 2) God Reload - cluster should restart the same process and set it as state online and be up:
Uncaught AssertionError: expected 17 to equal 1
+ expected - actual
+1
-17
at Assertion.fail (/home/deployer/dev/pm2/node_modules/should/lib/assertion.js:199:17)
at Assertion.prop.(anonymous function) [as eql] (/home/deployer/dev/pm2/node_modules/should/lib/assertion.js:64:14)
at /home/deployer/dev/pm2/test/programmatic/god.mocha.js:231:44
at Array.forEach (native)
at /home/deployer/dev/pm2/test/programmatic/god.mocha.js:230:19
at /home/deployer/dev/pm2/lib/God/Reload.js:272:14
at /home/deployer/dev/pm2/node_modules/async/lib/async.js:203:33
at /home/deployer/dev/pm2/lib/God/Reload.js:267:16
at Worker.cluOnline (/home/deployer/dev/pm2/lib/God.js:218:17)
at Worker.g (events.js:199:16)
at Worker.emit (events.js:104:17)
at online (cluster.js:430:12)
at Worker.onmessage (cluster.js:417:7)
at ChildProcess.<anonymous> (cluster.js:673:8)
at ChildProcess.emit (events.js:129:20)
at handleMessage (child_process.js:323:10)
at Pipe.channel.onread (child_process.js:351:11)
2015-01-19 13:02:48: 3) God Multi launching "before all" hook:
Uncaught TypeError: Cannot read property 'pm2_env' of undefined
at recur_path (/home/deployer/dev/pm2/lib/God.js:425:9)
at /home/deployer/dev/pm2/node_modules/vizion/lib/vizion.js:18:14
at /home/deployer/dev/pm2/node_modules/vizion/lib/identify.js:18:12
at /home/deployer/dev/pm2/node_modules/async/lib/async.js:157:25
at /home/deployer/dev/pm2/node_modules/vizion/lib/identify.js:14:16
at Object.cb [as oncomplete] (fs.js:187:19)
npm ERR! Test failed. See above for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment