Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Add broken test-isolates3.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jan 10, 2012
1 parent d4ee61f commit e1b829d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/simple/test-child-process-fork3.js
Expand Up @@ -25,8 +25,12 @@ var fork = require('child_process').fork;

var filename = common.fixturesDir + '/destroy-stdin.js';

var options = {
thread: process.TEST_ISOLATE ? true : false
};

// Ensure that we don't accidentally close fd 0 and
// reuse it for something else, it causes all kinds
// of obscure bugs.
process.stdin.destroy();
fork(filename).stdin.on('end', process.exit);
fork(filename, [], options).stdin.on('end', process.exit);
13 changes: 13 additions & 0 deletions test/simple/test-isolates3.js
@@ -0,0 +1,13 @@
// Skip this test if Node is not compiled with isolates support.
if (!process.features.isolates) return;

var assert = require('assert');

// This is the same test as test-child-process-fork3 except it uses isolates
// instead of processes. process.TEST_ISOLATE is a ghetto method of passing
// some information into the other test.
process.TEST_ISOLATE = true;
require('./test-child-process-fork3');

var numThreads = process.binding('isolates').count();
assert.ok(numThreads > 1);

0 comments on commit e1b829d

Please sign in to comment.