Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-eio-race2.js « disabled « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16c0468775adf86411f8cd985d6c0a3228de383f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
var common = require('../common');
var assert = require('assert');
var path = require('path');
var testTxt = path.join(common.fixturesDir, 'x.txt');
var fs = require('fs');

setTimeout(function() {
  // put this in a timeout, just so it doesn't get bunched up with the
  // require() calls..
  var N = 30;
  for (var i = 0; i < N; i++) {
    console.log('start ' + i);
    fs.readFile(testTxt, function(err, data) {
      if (err) {
        console.log('error! ' + e);
        process.exit(1);
      } else {
        console.log('finish');
      }
    });
  }
}, 100);