diff options
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/node.scm | 29 | ||||
-rw-r--r-- | gnu/packages/patches/node-test-http2-server-rst-stream.patch | 131 |
3 files changed, 19 insertions, 142 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index fbc5f52c9c..514daec1c5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -889,7 +889,6 @@ dist_patch_DATA = \ %D%/packages/patches/newsbeuter-CVE-2017-14500.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/ninja-zero-mtime.patch \ - %D%/packages/patches/node-test-http2-server-rst-stream.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ %D%/packages/patches/nvi-assume-preserve-path.patch \ diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index fade8b23da..052966ea34 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -41,18 +41,14 @@ (define-public node (package (name "node") - (version "8.9.1") + (version "9.3.0") (source (origin (method url-fetch) (uri (string-append "http://nodejs.org/dist/v" version "/node-v" version ".tar.gz")) (sha256 (base32 - "1qbiz7hgwlirhwpd71c8yzcbwsyi5bjlfp6lxb6v55j6rizinj9j")) - ;; See https://github.com/nodejs/node/issues/16688 - ;; Remove this next update (>8.9.1). - (patches - (search-patches "node-test-http2-server-rst-stream.patch")))) + "19g2pc196rxlj9k5bwhqxdjddvicsx385w7yj6alq9l82lmqycxp")))) (build-system gnu-build-system) (arguments ;; TODO: Purge the bundled copies from the source. @@ -85,11 +81,24 @@ ;; test-make-doc needs doc-only target, which is inhibited below (for-each delete-file '("test/doctool/test-make-doc.js")) - ;; FIXME: This test seems to depends on files that are not - ;; available in the bundled v8. See - ;; https://github.com/nodejs/node/issues/13344 + ;; FIXME: These tests depend on being able to install eslint. + ;; See https://github.com/nodejs/node/issues/17098. (for-each delete-file - '("test/addons-napi/test_general/testInstanceOf.js")) + '("test/parallel/test-eslint-crypto-check.js" + "test/parallel/test-eslint-alphabetize-errors.js" + "test/parallel/test-eslint-buffer-constructor.js" + "test/parallel/test-eslint-documented-errors.js" + "test/parallel/test-eslint-inspector-check.js" + "test/parallel/test-eslint-no-unescaped-regexp-dot.js" + "test/parallel/test-eslint-no-let-in-for-declaration.js" + "test/parallel/test-eslint-prefer-assert-iferror.js" + "test/parallel/test-eslint-prefer-assert-methods.js" + "test/parallel/test-eslint-prefer-common-expectserror.js" + "test/parallel/test-eslint-prefer-common-mustnotcall.js" + "test/parallel/test-eslint-prefer-util-format-errors.js" + "test/parallel/test-eslint-require-buffer.js" + "test/parallel/test-eslint-required-modules.js")) + ;; FIXME: These tests fail in the build container, but they don't ;; seem to be indicative of real problems in practice. (for-each delete-file diff --git a/gnu/packages/patches/node-test-http2-server-rst-stream.patch b/gnu/packages/patches/node-test-http2-server-rst-stream.patch deleted file mode 100644 index c2f85010b1..0000000000 --- a/gnu/packages/patches/node-test-http2-server-rst-stream.patch +++ /dev/null @@ -1,131 +0,0 @@ -From a41cc020fd6e40b358103425edfa50e6a10fc973 Mon Sep 17 00:00:00 2001 -From: Anatoli Papirovski <apapirovski@mac.com> -Date: Thu, 2 Nov 2017 12:46:31 -0400 -Subject: [PATCH] test: fix flaky test-http2-server-rst-stream.js - -PR-URL: https://github.com/nodejs/node/pull/16690 -Fixes: https://github.com/nodejs/node/issues/16688 -Reviewed-By: James M Snell <jasnell@gmail.com> -Reviewed-By: Matteo Collina <matteo.collina@gmail.com> ---- - test/parallel/test-http2-server-rst-stream.js | 93 ++++++++++----------------- - 1 file changed, 35 insertions(+), 58 deletions(-) - -diff --git a/test/parallel/test-http2-server-rst-stream.js b/test/parallel/test-http2-server-rst-stream.js -index b92217dc99..dd38efb42f 100644 ---- a/test/parallel/test-http2-server-rst-stream.js -+++ b/test/parallel/test-http2-server-rst-stream.js -@@ -5,11 +5,9 @@ if (!common.hasCrypto) - common.skip('missing crypto'); - const assert = require('assert'); - const http2 = require('http2'); -+const Countdown = require('../common/countdown'); - - const { -- HTTP2_HEADER_METHOD, -- HTTP2_HEADER_PATH, -- HTTP2_METHOD_POST, - NGHTTP2_CANCEL, - NGHTTP2_NO_ERROR, - NGHTTP2_PROTOCOL_ERROR, -@@ -17,63 +15,42 @@ const { - NGHTTP2_INTERNAL_ERROR - } = http2.constants; - --const errCheck = common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR' }, 6); -+const tests = [ -+ ['rstStream', NGHTTP2_NO_ERROR, false], -+ ['rstWithNoError', NGHTTP2_NO_ERROR, false], -+ ['rstWithProtocolError', NGHTTP2_PROTOCOL_ERROR, true], -+ ['rstWithCancel', NGHTTP2_CANCEL, false], -+ ['rstWithRefuse', NGHTTP2_REFUSED_STREAM, true], -+ ['rstWithInternalError', NGHTTP2_INTERNAL_ERROR, true] -+]; -+ -+const server = http2.createServer(); -+server.on('stream', (stream, headers) => { -+ const method = headers['rstmethod']; -+ stream[method](); -+}); -+ -+server.listen(0, common.mustCall(() => { -+ const client = http2.connect(`http://localhost:${server.address().port}`); -+ -+ const countdown = new Countdown(tests.length, common.mustCall(() => { -+ client.destroy(); -+ server.close(); -+ })); - --function checkRstCode(rstMethod, expectRstCode) { -- const server = http2.createServer(); -- server.on('stream', (stream, headers, flags) => { -- stream.respond({ -- 'content-type': 'text/html', -- ':status': 200 -+ tests.forEach((test) => { -+ const req = client.request({ -+ ':method': 'POST', -+ rstmethod: test[0] - }); -- stream.write('test'); -- if (rstMethod === 'rstStream') -- stream[rstMethod](expectRstCode); -- else -- stream[rstMethod](); -- -- if (expectRstCode !== NGHTTP2_NO_ERROR && -- expectRstCode !== NGHTTP2_CANCEL) { -- stream.on('error', common.mustCall(errCheck)); -- } else { -- stream.on('error', common.mustNotCall()); -- } -- }); -- -- server.listen(0, common.mustCall(() => { -- const port = server.address().port; -- const client = http2.connect(`http://localhost:${port}`); -- -- const headers = { -- [HTTP2_HEADER_PATH]: '/', -- [HTTP2_HEADER_METHOD]: HTTP2_METHOD_POST -- }; -- const req = client.request(headers); -- -- req.setEncoding('utf8'); -- req.on('streamClosed', common.mustCall((actualRstCode) => { -- assert.strictEqual( -- expectRstCode, actualRstCode, `${rstMethod} is not match rstCode`); -- server.close(); -- client.destroy(); -+ req.on('streamClosed', common.mustCall((code) => { -+ assert.strictEqual(code, test[1]); -+ countdown.dec(); - })); -- req.on('data', common.mustCall()); - req.on('aborted', common.mustCall()); -- req.on('end', common.mustCall()); -- -- if (expectRstCode !== NGHTTP2_NO_ERROR && -- expectRstCode !== NGHTTP2_CANCEL) { -- req.on('error', common.mustCall(errCheck)); -- } else { -+ if (test[2]) -+ req.on('error', common.mustCall()); -+ else - req.on('error', common.mustNotCall()); -- } -- -- })); --} -- --checkRstCode('rstStream', NGHTTP2_NO_ERROR); --checkRstCode('rstWithNoError', NGHTTP2_NO_ERROR); --checkRstCode('rstWithProtocolError', NGHTTP2_PROTOCOL_ERROR); --checkRstCode('rstWithCancel', NGHTTP2_CANCEL); --checkRstCode('rstWithRefuse', NGHTTP2_REFUSED_STREAM); --checkRstCode('rstWithInternalError', NGHTTP2_INTERNAL_ERROR); -+ }); -+})); --- -2.15.0 - |