diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2012-01-14 21:48:56 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2012-01-14 21:48:56 +0400 |
commit | e03b42d1bb41f4e897a4f025f89db70582964814 (patch) | |
tree | c822d0e6960da9451bf46f3b91228bbd3d358973 /test | |
parent | f2ba4cef2af79b89b0b1a201496ee134f4891b7f (diff) |
Add failing test-eio-limit.js
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-eio-limit.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/simple/test-eio-limit.js b/test/simple/test-eio-limit.js new file mode 100644 index 00000000000..096b970abc0 --- /dev/null +++ b/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++; + }); + } +}); |