Add failing test-isolates2.js
This commit is contained in:
parent
4cbcdb4b2c
commit
d4ee61ffc7
@ -27,7 +27,11 @@ var net = require('net');
|
|||||||
var socketCloses = 0;
|
var socketCloses = 0;
|
||||||
var N = 10;
|
var N = 10;
|
||||||
|
|
||||||
var n = fork(common.fixturesDir + '/fork2.js');
|
var options = {
|
||||||
|
thread: process.TEST_ISOLATE ? true : false
|
||||||
|
};
|
||||||
|
|
||||||
|
var n = fork(common.fixturesDir + '/fork2.js', [], options);
|
||||||
|
|
||||||
var messageCount = 0;
|
var messageCount = 0;
|
||||||
|
|
||||||
|
13
test/simple/test-isolates1.js
Normal file
13
test/simple/test-isolates1.js
Normal file
@ -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-fork 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-fork');
|
||||||
|
|
||||||
|
var numThreads = process.binding('isolates').count();
|
||||||
|
assert.ok(numThreads > 1);
|
@ -3,11 +3,11 @@ if (!process.features.isolates) return;
|
|||||||
|
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
||||||
// This is the same test as test-child-process-fork except it uses isolates
|
// This is the same test as test-child-process-fork2 except it uses isolates
|
||||||
// instead of processes. process.TEST_ISOLATE is a ghetto method of passing
|
// instead of processes. process.TEST_ISOLATE is a ghetto method of passing
|
||||||
// some information into the other test.
|
// some information into the other test.
|
||||||
process.TEST_ISOLATE = true;
|
process.TEST_ISOLATE = true;
|
||||||
require('./test-child-process-fork');
|
require('./test-child-process-fork2');
|
||||||
|
|
||||||
var numThreads = process.binding('isolates').count();
|
var numThreads = process.binding('isolates').count();
|
||||||
assert.ok(numThreads > 1);
|
assert.ok(numThreads > 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user