Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
test: bp fix for test-http-get-pipeline-problem.js
Browse files Browse the repository at this point in the history
backport fix for test-http-get-pipeline-problem.js from master
to 0.12.X.  We've been seeing an intermittent failure
in runs for zLinux with SLES 12.  We confirmed that this fix
resolves the issue so would like it in 0.12.X

The original commit does not apply cleanly as the paths were
changed, but the actual change is identical.  The original commit was:

nodejs/node@3ba4f71

PR-URL: nodejs/node#3013
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
mhdawson authored and jBarz committed Nov 4, 2016
1 parent 3d9cf0b commit f89cff8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/simple/test-http-get-pipeline-problem.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ server.listen(common.PORT, function() {
var s = fs.createWriteStream(common.tmpDir + '/' + x + '.jpg');
res.pipe(s);

// TODO there should be a callback to pipe() that will allow
// us to get a callback when the pipe is finished.
res.on('end', function() {
s.on('finish', function() {
console.error('done ' + x);
if (++responses == total) {
s.on('close', checkFiles);
checkFiles();
}
});
}).on('error', function(e) {
Expand Down

0 comments on commit f89cff8

Please sign in to comment.