Skip to content

Commit 154098a

Browse files
mhdawsonjasnell
authored andcommitted
test: bp fix for test-http-get-pipeline-problem.js
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: 3ba4f71 PR-URL: #3013 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ff2bed6 commit 154098a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/simple/test-http-get-pipeline-problem.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ server.listen(common.PORT, function() {
6868
var s = fs.createWriteStream(common.tmpDir + '/' + x + '.jpg');
6969
res.pipe(s);
7070

71-
// TODO there should be a callback to pipe() that will allow
72-
// us to get a callback when the pipe is finished.
73-
res.on('end', function() {
71+
s.on('finish', function() {
7472
console.error('done ' + x);
7573
if (++responses == total) {
76-
s.on('close', checkFiles);
74+
checkFiles();
7775
}
7876
});
7977
}).on('error', function(e) {

0 commit comments

Comments
 (0)