Clean up cluster tests and wrap in namespace

This commit is contained in:
TonyYang
2016-09-08 11:49:34 +08:00
committed by GitHub
parent ef9f5203e0
commit 79c00498a1

View File

@@ -724,13 +724,17 @@ childProcess.spawnSync("echo test");
/// cluster tests: https://nodejs.org/api/cluster.html ///
//////////////////////////////////////////////////////////////////////
cluster.fork();
Object.keys(cluster.workers).forEach(key => {
const worker = cluster.workers[key];
if (worker.isDead()) {
console.log('worker %d is dead', worker.process.pid);
namespace cluster_tests {
{
cluster.fork();
Object.keys(cluster.workers).forEach(key => {
const worker = cluster.workers[key];
if (worker.isDead()) {
console.log('worker %d is dead', worker.process.pid);
}
});
}
});
}
////////////////////////////////////////////////////
/// os tests : https://nodejs.org/api/os.html