summaryrefslogtreecommitdiff
path: root/test/parallel/test-cluster-disconnect-with-no-workers.js
blob: 4c2425d82d656b0c4d31ada793ee76aaa789787d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';
require('../common');
var assert = require('assert');
var cluster = require('cluster');

var disconnected;

process.on('exit', function() {
  assert(disconnected);
});

cluster.disconnect(function() {
  disconnected = true;
});

// Assert that callback is not sometimes synchronous
assert(!disconnected);