summaryrefslogtreecommitdiff
path: root/test/parallel
AgeCommit message (Collapse)Author
2019-02-09http2: makes response.writeHead return the responseMark S. Everitt
Fixes: https://github.com/nodejs/node/issues/25935 PR-URL: https://github.com/nodejs/node/pull/25974 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-02-09http: makes response.writeHead return the responseMark S. Everitt
Fixes: https://github.com/nodejs/node/issues/25935 PR-URL: https://github.com/nodejs/node/pull/25974 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-02-08worker: use correct ctor for error serializationAnna Henningsen
When serializing errors, use the error constructor that is closest to the object itself in the prototype chain. The previous practice of walking downwards meant that `Error` would usually be the first constructor that is used, even when a more specific one would be available/appropriate, because it is the base class of the other common error types. PR-URL: https://github.com/nodejs/node/pull/25951 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08src: allow --perf-prof-unwinding-info in NODE_OPTIONSTom Gallacher
PR-URL: https://github.com/nodejs/node/pull/25565 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-08src: allow --perf-basic-prof-only-functions in NODE_OPTIONSTom Gallacher
PR-URL: https://github.com/nodejs/node/pull/25565 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-08test: refactor to block-scopeLakshmiSwethaG
PR-URL: https://github.com/nodejs/node/pull/25532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-08assert: create internal/assert micro-moduleRich Trott
For use in built-in modules that could benefit from `assert()` without having to load the entire module (unless an AssertionError actually occurs): lib/internal/assert.js. PR-URL: https://github.com/nodejs/node/pull/25956 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-02-08test: exit sequence sanity testsGireesh Punathil
Execute JS code in worker through same vm context while exiting from the main thread at arbitrary execution points, and make sure that the workers quiesce without crashing. `worker_threads` are not necessarily the subject of testing, those are used for easy simulation of multi-thread scenarios. Refs: https://github.com/nodejs/node/issues/25007 PR-URL: https://github.com/nodejs/node/pull/25085 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-07test: refactor test-http-agent-timeout-optionLuigi Pinca
There is no need to establish a TCP connection. It is sufficient to test that the listener that forwards the `'timeout'` event from the socket to the `ClientRequest` instance is added to the socket. PR-URL: https://github.com/nodejs/node/pull/25886 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-06test: clarify confusion over "client" in commentSam Roberts
Fix perplexing comment. It's not that TLS "clients" don't support 'secureConnect', it's that client sockets created with `new TLSSocket` (as opposed to `tls.connect()`) don't support that event. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: use mustCall(), not global state checksSam Roberts
Instead of pushing state into global arrays and checking the results before exit, use common.mustCall() and make the checks immediately. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: use common.mustCall(), and log the eventsSam Roberts
PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: use mustCall in ephemeralkeyinfo testSam Roberts
PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: send a bad record only after connection doneSam Roberts
Connection is known to be completely setup only after data has exchanged, so wait unil data echo before sending a bad record. Otherwise, the bad record could interrupt completion of the server's handshake, and whether the error is emitted on the connection or server is a matter of timing. Also, assert that server errors do not occur. 'error' would crash node with and unhandled event, but 'tlsClientError' is ignored by default. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: end tls gracefully, rather than destroySam Roberts
The timing of destroy between client/server is undefined, but end is guaranteed to occur. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: pin regression test for #8074 to TLS 1.2Sam Roberts
This test has a dependency on the order in which the TCP connection is made, and TLS server handshake completes. It assumes those server side events occur before the client side write callback, which is not guaranteed by the TLS API. It usually passes with TLS1.3, but TLS1.3 didn't exist at the time the bug existed. Pin the test to TLS1.2, since the test shouldn't be changed in a way that doesn't trigger a segfault in 7.7.3: - https://github.com/nodejs/node/issues/13184#issuecomment-303700377 PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: do not race connection and rejectionSam Roberts
Existing code assumed that the server completed the handshake before the client rejected the certificate, and destroyed the socket. This assumption is fragile, remove it, and instead check explicitly that data can or cannot be exchanged via TLS, whichever is expected. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: do not assume tls handshake orderSam Roberts
Do not assume that server handshake event happens before client, it is not guaranteed. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: do not assume server gets secure connectionSam Roberts
Test assumed that server got the the connection before the client destroys it, but that is not guaranteed. Also, the test was closing the TCP connection 3 times, effectively: 1. on the server side, right after TLS connection occurs (if it does) 2. on the client side, internal to tls, when the cert is rejected 3. again on the client side, in the error event which is emitted by the internal tls destroy from 2 This is too often, and the dependency on 1 occurring is fragile. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: wait for TCP connect, not TLS handshakeSam Roberts
Test assumed server gets a handshake before the client destroyed it, and didn't assert that dns.lookup() callback occurred. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: add util.isDeepStrictEqual edge case testsRich Trott
Test for deep strict equality when prototype and toStringTag have been modified in surprising ways. PR-URL: https://github.com/nodejs/node/pull/25932 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06test: add BigInt test for isDeepStrictEqualRich Trott
Add some BigInt tests for test-util-isDeepStrictEqual to get 100% coverage for lib/internal/util/comparisons.js. PR-URL: https://github.com/nodejs/node/pull/25932 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06tls: null not valid as a renegotiate callbackSam Roberts
Allow undefined as a callback, but do not allow null. PR-URL: https://github.com/nodejs/node/pull/25929 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-06child_process: close pipe ends that are re-pipedGireesh Punathil
when t0 and t1 are spawned with t0's outputstream [1, 2] is piped into t1's input, a new pipe is created which uses a copy of the t0's fd. This leaves the original copy in Node parent, unattended. Net result is that when t0 produces data, it gets bifurcated into both the copies Detect the passed handle to be of 'wrap' type and close after the native spawn invocation by which time piping would have been over. Fixes: https://github.com/nodejs/node/issues/9413 Fixes: https://github.com/nodejs/node/issues/18016 PR-URL: https://github.com/nodejs/node/pull/21209 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-06test: remove obsolete codeRuben Bridgewater
The removed line does not add anything of value to the test. It was removed to simplify the test. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-02-06repl: simplify and improve completionRuben Bridgewater
The completion lists used a hand crafted list of global entries that was redundant due to also using the actual global properties for tab completion. Those entries ended up in an separated completion group which did not seem useful. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-02-06deps: patch to fix *.onion MX query on c-aresXadillaX
c-ares rejects *.onion MX query but forgot to set `*bufp` to NULL. This will occur SegmentFault when free `*bufp`. I make this quick fix and then will make a PR for c-ares either. PR-URL: https://github.com/nodejs/node/pull/25840 Fixes: https://github.com/nodejs/node/issues/25839 Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_create_query.c#L97-L103 Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_query.c#L124 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-05process: stub unsupported worker methodscjihrig
Some process methods are not supported in workers. This commit adds stubs that throw more informative errors. PR-URL: https://github.com/nodejs/node/pull/25587 Fixes: https://github.com/nodejs/node/issues/25448 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-05test,tracing: use close event to wait for stdioAnna Henningsen
Use `'close'` rather than `'exit'` to make sure that all stdio has been captured by the time that the event handler is run. PR-URL: https://github.com/nodejs/node/pull/25894 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-05test: relax expectations in test-icu-transcodeYang Guo
Chromium's ICU considers "latin1" and "ascii" to mean Windows-1252, which is consistent with [WHATWG spec](https://encoding.spec.whatwg.org/#names-and-labels). If linked against Chromium's ICU, Node.js therefore fails `test/parallel/test-icu-transcode`. PR-URL: https://github.com/nodejs/node/pull/25866 Refs: https://github.com/nodejs/node/issues/25851 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-02-04tls: check arg types of renegotiate()Sam Roberts
Don't throw on invalid property access if options is not provided, and ensure callback is a function. PR-URL: https://github.com/nodejs/node/pull/25876 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-04test: add hasCrypto to worker-cleanexit-with-moduleloadDaniel Bevenius
Currently, this test fails when configured --without-ssl: === release test-worker-cleanexit-with-moduleload === Path: parallel/test-worker-cleanexit-with-moduleload events.js:173 throw er; // Unhandled 'error' event ^ internal/util.js:101 throw new ERR_NO_CRYPTO(); ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support This commit as a check for crypto so that this test is skipped if there is no crypto support. PR-URL: https://github.com/nodejs/node/pull/25811 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-02-01test: refactor test-http-agent-timeout-optionLuigi Pinca
Fix flakyness caused by usage of a non-routable IP address. Refs: https://github.com/nodejs/node/pull/25488#issuecomment-459385146 PR-URL: https://github.com/nodejs/node/pull/25854 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-02-01tls: introduce client 'session' eventSam Roberts
OpenSSL has supported async notification of sessions and tickets since 1.1.0 using SSL_CTX_sess_set_new_cb(), for all versions of TLS. Using the async API is optional for TLS1.2 and below, but for TLS1.3 it will be mandatory. Future-proof applications should start to use async notification immediately. In the future, for TLS1.3, applications that don't use the async API will silently, but gracefully, fail to resume sessions and instead do a full handshake. See: https://wiki.openssl.org/index.php/TLS1.3#Sessions PR-URL: https://github.com/nodejs/node/pull/25831 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2019-02-02process: expose process.features.inspectorJoyee Cheung
Instead of using process.config.variables.v8_enable_inspector to detect whether inspector is enabled in the build. PR-URL: https://github.com/nodejs/node/pull/25819 Refs: https://github.com/nodejs/node/issues/25343 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-01http: return HTTP 431 on HPE_HEADER_OVERFLOW errorAlbert Still
Instead of returning a generic 400 response when the max header size is reached, return a 431 Request Header Fields Too Large. This is a semver-major because it changes the HTTP status code for requests that trigger the header overflow error. PR-URL: https://github.com/nodejs/node/pull/25605 Fixes: https://github.com/nodejs/node/issues/25528 Refs: https://tools.ietf.org/html/rfc6585#section-5 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01worker: throw for duplicates in transfer listAnna Henningsen
Throw a `DataCloneError` exception when encountering duplicate `ArrayBuffer`s or `MessagePort`s in the transfer list. Fixes: https://github.com/nodejs/node/issues/25786 PR-URL: https://github.com/nodejs/node/pull/25815 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-31http: make timeout event work with agent timeoutLuigi Pinca
The `'timeout'` event is currently not emitted on the `ClientRequest` instance when the socket timeout expires if only the `timeout` option of the agent is set. This happens because, under these circumstances, `listenSocketTimeout()` is not called. This commit fixes the issue by calling it also when only the agent `timeout` option is set. PR-URL: https://github.com/nodejs/node/pull/25488 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30inspector, trace_events: make sure messages are sent on a main threadEugene Ostroukhov
Fixes: https://github.com/nodejs/node/issues/23185 PR-URL: https://github.com/nodejs/node/pull/24814 Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30module: do not use `process.exit()`Anna Henningsen
Inside workers, using stdio is always asynchronous, so using `process.exit()` always interrupts sending of messages to the parent thread, including error messages presented over stdio. Do not use `process.exit()` and instead trigger a “real” uncaught exception. PR-URL: https://github.com/nodejs/node/pull/25769 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30worker: export workerData to ESM workersAnna Henningsen
Fixes: https://github.com/nodejs/node/issues/25765 PR-URL: https://github.com/nodejs/node/pull/25768 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30test: move client renegotiation tests to parallelRich Trott
* Move client renegotiation limit tests from pummel to parallel. * Rename tests to more accurately reflect what they do. * Refactor to use arrow functions for anonymouse callbacks and to be consistent about trailing commas. PR-URL: https://github.com/nodejs/node/pull/25757 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30test: use fipsMode in test-crypto-fipsDaniel Bevenius
This commit updates test/parallel/test-crypto-fips.js to use fipsMode instead of process.config.variables.openssl_fips. The motivation for this is that since the addition of the --openssl-is-fips configuration flag, it is possible to dynamically link with a FIPS compliant OpenSSL library. Using fipsMode allows for determining if there is FIPS support when statically or dynamically linking against a FIPS compatible OpenSSL library. PR-URL: https://github.com/nodejs/node/pull/25563 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-29test: refactor test-http-client-timeout-option-with-agentRich Trott
* Switch from Date.now() to process.hrtime.bigint(). * Move start time recording to before the request is created, not after. Fixes: https://github.com/nodejs/node/issues/25746 PR-URL: https://github.com/nodejs/node/pull/25752 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29test: add test for `worker.terminate()` + timeout fnsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/25735 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29test: move heapdump tests to pummelRich Trott
The heapdump tests take a lot more time to run than our other tests in parallel. They are also a bit of an internal test that perhaps does not need to be run on every commit on every platform. This change moves them to the pummel directory where they will be run on a single platform once a day in CI. This shaves more than 20 seconds off `make test` on my laptop, FWIW. PR-URL: https://github.com/nodejs/node/pull/25181 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29test: exit sequence sanity testsGireesh Punathil
Execute many module loads in worker in a loop while exiting from the main thread at arbitrary execution points, and make sure that the workers quiesce without crashing. `worker_threads` are not necessarily the subject of testing, those are used for easy simulation of multi-thread scenarios. Refs: https://github.com/nodejs/node/issues/25007 PR-URL: https://github.com/nodejs/node/pull/25083 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29policy: ensure workers do not read fs for policyBradley Farias
This prevents a main thread from rewriting the policy file and loading a worker that has a different policy from the main thread. PR-URL: https://github.com/nodejs/node/pull/25710 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-01-28timers: truncate decimal valuesJeremiah Senkpiel
Reverts some timers behavior back to as it was before 2930bd1317d15d12738a4896c0a6c05700411b47 That commit introduced an unintended change which allowed non-integer timeouts to actually exist since the value is no longer converted to an integer via a TimeWrap handle directly. Even with the fix in e9de43549843da9f4f081cce917945878967df7 non-integer timeouts are still indeterministic, because libuv does not support them. This fixes the issue by emulating the old behavior: truncate the `_idleTimeout` before using it. See comments in https://github.com/nodejs/node/pull/24214 for more background on this. PR-URL: https://github.com/nodejs/node/pull/24819 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29test: fix zlib-brotli output assumptionsAdam Majer
On different architectures, it's possible for the compression algorithm to produce slightly different outputs. So, don't assume we will always get the same compressed output on all architectures. Instead, verify that the decompressing pre-compressed string functions correctly. Fixes: https://github.com/nodejs/node/issues/25568 PR-URL: https://github.com/nodejs/node/pull/25697 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>