Created
January 9, 2012 22:58
-
-
Save stash/1585476 to your computer and use it in GitHub Desktop.
Strange out-of-memory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var vows = require('vows'); | |
| var assert = require('assert'); | |
| var https = require('https'); | |
| vows.describe("dies?").addBatch({ | |
| "pretend this is doing several https requests": { | |
| topic: function() { | |
| var cb = this.callback; | |
| // https is important; http doesn't produce an error | |
| var req = https.request({host:'encrypted.google.com',path:'/',method:'GET'}, function(res) { | |
| res.on('end', function() { cb(null,[res]) }); | |
| }); | |
| req.on('error',cb); | |
| req.end(); | |
| }, | |
| "got two responses": function(responses) { | |
| assert.lengthOf(responses, 2); // <-- "FATAL ERROR: JS Allocation failed - process out of memory" | |
| }, | |
| } | |
| }).export(module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment