Browse Source

Add failing test-eio-limit.js

v0.7.4-release
Fedor Indutny 13 years ago
parent
commit
e03b42d1bb
  1. 28
      test/simple/test-eio-limit.js

28
test/simple/test-eio-limit.js

@ -0,0 +1,28 @@
var assert = require('assert'),
zlib = require('zlib'),
started = 0,
done = 0;
function repeat(fn) {
if (started != 0) {
assert.ok(started - done < 100)
}
process.nextTick(function() {
fn();
repeat(fn);
});
}
repeat(function() {
if (started > 1000) return process.exit(0);
for (var i = 0; i < 30; i++) {
started++;
var deflate = zlib.createDeflate();
deflate.write('123');
deflate.flush(function() {
done++;
});
}
});
Loading…
Cancel
Save