test.standalone-shutdown.js 263 B

123456789101112131415161718
  1. /**
  2. * Module dependencies.
  3. */
  4. var cluster = require('../');
  5. require('./common');
  6. cluster = cluster()
  7. .set('workers', 1)
  8. .start();
  9. if (cluster.isWorker) {
  10. setTimeout(function(){
  11. process.kill(process.env.CLUSTER_MASTER_PID, 'SIGQUIT');
  12. }, 500);
  13. }