Skip to content

Commit dd76b36

Browse files
Trottpull[bot]
authored andcommitted
test: fix flaky test-http2-respond-file-error-pipe-offset
Fixes: nodejs#35881 PR-URL: nodejs#36305 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a4f75e9 commit dd76b36

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

test/parallel/parallel.status

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ prefix parallel
55
# sample-test : PASS,FLAKY
66

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

119
[$system==win32]
1210
# https://github.com/nodejs/node/issues/20750

test/parallel/test-http2-respond-file-error-pipe-offset.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ server.listen(0, () => {
5656
req.end();
5757
});
5858

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

0 commit comments

Comments
 (0)