diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-06-03 02:12:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-02 21:12:52 -0400 |
commit | 754f21f0cd6b788ded48238c5acc3f635329d473 (patch) | |
tree | 89747f5a87cafd6f9a7e7ef8ada749938d272547 /tests/node_compat | |
parent | f8fdaa082b16cfa63afa59a7d9dff87ddf9f7138 (diff) |
chore: disable part of `test-fs-read-stream.js` (#24085)
Diffstat (limited to 'tests/node_compat')
-rw-r--r-- | tests/node_compat/config.jsonc | 1 | ||||
-rw-r--r-- | tests/node_compat/test/parallel/test-fs-read-stream.js | 49 |
2 files changed, 26 insertions, 24 deletions
diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 56f43b444..9729507dd 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -72,6 +72,7 @@ "test-fs-mkdir.js", "test-fs-open.js", "test-fs-opendir.js", + "test-fs-read-stream.js", "test-fs-rmdir-recursive.js", "test-fs-write-file.js", "test-fs-write.js", diff --git a/tests/node_compat/test/parallel/test-fs-read-stream.js b/tests/node_compat/test/parallel/test-fs-read-stream.js index 3bed0f965..0998d3ca8 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream.js @@ -197,30 +197,31 @@ assert.throws( })); } -if (!common.isWindows) { - // Verify that end works when start is not specified, and we do not try to - // use positioned reads. This makes sure that this keeps working for - // non-seekable file descriptors. - tmpdir.refresh(); - const filename = `${tmpdir.path}/foo.pipe`; - const mkfifoResult = child_process.spawnSync('mkfifo', [filename]); - if (!mkfifoResult.error) { - child_process.exec(`echo "xyz foobar" > '${filename}'`); - const stream = new fs.createReadStream(filename, common.mustNotMutateObjectDeep({ end: 1 })); - stream.data = ''; - - stream.on('data', function(chunk) { - stream.data += chunk; - }); - - stream.on('end', common.mustCall(function() { - assert.strictEqual(stream.data, 'xy'); - fs.unlinkSync(filename); - })); - } else { - common.printSkipMessage('mkfifo not available'); - } -} +// TODO(bartlomieju): this bit became very flaky on CI, and so far we haven't pinpointed the exact cause +// if (!common.isWindows) { +// // Verify that end works when start is not specified, and we do not try to +// // use positioned reads. This makes sure that this keeps working for +// // non-seekable file descriptors. +// tmpdir.refresh(); +// const filename = `${tmpdir.path}/foo.pipe`; +// const mkfifoResult = child_process.spawnSync('mkfifo', [filename]); +// if (!mkfifoResult.error) { +// child_process.exec(`echo "xyz foobar" > '${filename}'`); +// const stream = new fs.createReadStream(filename, common.mustNotMutateObjectDeep({ end: 1 })); +// stream.data = ''; + +// stream.on('data', function(chunk) { +// stream.data += chunk; +// }); + +// stream.on('end', common.mustCall(function() { +// assert.strictEqual(stream.data, 'xy'); +// fs.unlinkSync(filename); +// })); +// } else { +// common.printSkipMessage('mkfifo not available'); +// } +// } { // Pause and then resume immediately. |