node/test/parallel/test-cluster-disconnect-with-no-workers.js

16 lines
283 B
JavaScript
Raw Normal View History

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);