Skip to content

Commit

Permalink
test: fix flaky test-http2-respond-file-error-pipe-offset
Browse files Browse the repository at this point in the history
Fixes: #35881

PR-URL: #36305
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Trott committed Dec 7, 2020
1 parent 537da19 commit f178c5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ prefix parallel
# sample-test : PASS,FLAKY

[true] # This section applies to all platforms
# https://github.com/nodejs/node/issues/35881
test-http2-respond-file-error-pipe-offset: PASS,FLAKY

[$system==win32]
# https://github.com/nodejs/node/issues/20750
Expand Down
9 changes: 8 additions & 1 deletion test/parallel/test-http2-respond-file-error-pipe-offset.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@ server.listen(0, () => {
req.end();
});

fs.writeFile(pipeName, 'Hello, world!\n', common.mustSucceed());
fs.writeFile(pipeName, 'Hello, world!\n', common.mustCall((err) => {
// It's possible for the reading end of the pipe to get the expected error
// and break everything down before we're finished, so allow `EPIPE` but
// no other errors.
if (err?.code !== 'EPIPE') {
assert.ifError(err);
}
}));

0 comments on commit f178c5a

Please sign in to comment.