Skip to content

Commit a7e794d

Browse files
Trottdanielleadams
authored andcommitted
test: fix flaky test-http2-respond-file-error-pipe-offset
Fixes: #35881 PR-URL: #36305 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1091a65 commit a7e794d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/parallel/parallel.status

-2
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

+8-1
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)