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 <[email protected]>
  • Loading branch information
Trott authored and danielleadams committed Dec 7, 2020
1 parent 1091a65 commit a7e794d
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 a7e794d

Please sign in to comment.