From 754f21f0cd6b788ded48238c5acc3f635329d473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 3 Jun 2024 02:12:52 +0100 Subject: [PATCH] chore: disable part of `test-fs-read-stream.js` (#24085) --- tests/node_compat/config.jsonc | 1 + .../test/parallel/test-fs-read-stream.js | 45 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 56f43b444f..9729507dd0 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 3bed0f965e..0998d3ca82 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 = ''; +// 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('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'); - } -} +// 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.