diff options
author | Rich Trott <rtrott@gmail.com> | 2018-04-04 20:45:44 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-04-06 21:02:36 -0700 |
commit | a639ec4ca860c3feb3bdbcf023383840c54c1dda (patch) | |
tree | 0f542b0d3a41e83040514abe2390a4f4ce4ceac9 /test/parallel/test-http-dump-req-when-res-ends.js | |
parent | e5f8924064287c3e4d234fe23fcce5b2f10b6d18 (diff) | |
download | android-node-v8-a639ec4ca860c3feb3bdbcf023383840c54c1dda.tar.gz android-node-v8-a639ec4ca860c3feb3bdbcf023383840c54c1dda.tar.bz2 android-node-v8-a639ec4ca860c3feb3bdbcf023383840c54c1dda.zip |
test: move test-http-dump-req-when-res-end
The implementataion is sensitive to system resource availability, so
move it to sequential instead of running out of parallel directory.
Fixes: https://github.com/nodejs/node/issues/19139
PR-URL: https://github.com/nodejs/node/pull/19819
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-dump-req-when-res-ends.js')
-rw-r--r-- | test/parallel/test-http-dump-req-when-res-ends.js | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/test/parallel/test-http-dump-req-when-res-ends.js b/test/parallel/test-http-dump-req-when-res-ends.js deleted file mode 100644 index e87dfee96f..0000000000 --- a/test/parallel/test-http-dump-req-when-res-ends.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -const common = require('../common'); -const http = require('http'); -const fs = require('fs'); - -const server = http.createServer(function(req, res) { - // this checks if the request gets dumped - req.on('resume', common.mustCall(function() { - console.log('resume called'); - - req.on('data', common.mustCallAtLeast(function(d) { - console.log('data', d); - }, 1)); - })); - - // end is not called as we are just exhausting - // the in-memory buffer - req.on('end', common.mustNotCall); - - // this 'data' handler will be removed when dumped - req.on('data', common.mustNotCall); - - // start sending the response - res.flushHeaders(); - - setTimeout(function() { - res.end('hello world'); - }, common.platformTimeout(100)); -}); - -server.listen(0, function() { - const req = http.request({ - method: 'POST', - port: server.address().port - }); - - // Send the http request without waiting - // for the body - req.flushHeaders(); - - req.on('response', common.mustCall(function(res) { - // pipe the body as soon as we get the headers of the - // response back - fs.createReadStream(__filename).pipe(req); - - res.resume(); - - // wait for the response - res.on('end', function() { - server.close(); - }); - })); -}); |