From 5881033138a60f1dc20149ae8b37054348de9e3e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Sep 2017 10:23:38 -0700 Subject: [PATCH] test: remove invalid test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `test/known_issues/test-stdout-buffer-flush-on-exit.js` is invalid. The behavior seen currently (with the test failing) is in accordance with documentation which indicates that calling `process.exit()` may mean scheduled asynchronous I/O does not happen. The documentation also indicates that `process.stdout` is asynchronous when it is a POSIX pipe. PR-URL: https://github.com/nodejs/node/pull/15320 Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- .../test-stdout-buffer-flush-on-exit.js | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 test/known_issues/test-stdout-buffer-flush-on-exit.js diff --git a/test/known_issues/test-stdout-buffer-flush-on-exit.js b/test/known_issues/test-stdout-buffer-flush-on-exit.js deleted file mode 100644 index 931f1026cfa9c6..00000000000000 --- a/test/known_issues/test-stdout-buffer-flush-on-exit.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; -// Refs: https://github.com/nodejs/node/issues/2148 - -require('../common'); -const assert = require('assert'); -const execSync = require('child_process').execSync; - -const lineSeed = 'foo bar baz quux quuz aaa bbb ccc'; - -if (process.argv[2] === 'child') { - const longLine = lineSeed.repeat(parseInt(process.argv[4], 10)); - process.on('exit', () => { - console.log(longLine); - }); - process.exit(); -} - -[22, 21, 20, 19, 18, 17, 16, 16, 17, 18, 19, 20, 21, 22].forEach((exponent) => { - const bigNum = Math.pow(2, exponent); - const longLine = lineSeed.repeat(bigNum); - const cmd = - `"${process.execPath}" "${__filename}" child ${exponent} ${bigNum}`; - const stdout = execSync(cmd).toString().trim(); - - assert.strictEqual(stdout, longLine, `failed with exponent ${exponent}`); -});