0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/disabled/test-eio-race2.js

24 lines
583 B
JavaScript
Raw Normal View History

'use strict';
2010-12-05 00:20:34 +01:00
var common = require('../common');
var assert = require('assert');
var path = require('path');
var testTxt = path.join(common.fixturesDir, 'x.txt');
2010-02-12 10:04:14 +01:00
var fs = require('fs');
setTimeout(function() {
// put this in a timeout, just so it doesn't get bunched up with the
// require() calls..
2010-12-05 00:20:34 +01:00
var N = 30;
for (var i = 0; i < N; i++) {
console.log('start ' + i);
2010-02-20 01:02:30 +01:00
fs.readFile(testTxt, function(err, data) {
if (err) {
console.log('error! ' + e);
2010-02-20 01:02:30 +01:00
process.exit(1);
} else {
console.log('finish');
2010-02-20 01:02:30 +01:00
}
});
}
}, 100);