diff options
author | Rich Trott <rtrott@gmail.com> | 2018-12-21 19:52:57 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-01-29 09:10:36 -0800 |
commit | 87f6804b80b000e5a8d534b78c684e985ee9c3e6 (patch) | |
tree | eb829d74d614349d094b611c20d298834e79f77f /test/parallel | |
parent | b5304662ed23e81948f33d110bb15fc4f3a72cb1 (diff) | |
download | android-node-v8-87f6804b80b000e5a8d534b78c684e985ee9c3e6.tar.gz android-node-v8-87f6804b80b000e5a8d534b78c684e985ee9c3e6.tar.bz2 android-node-v8-87f6804b80b000e5a8d534b78c684e985ee9c3e6.zip |
test: move heapdump tests to pummel
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>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-heapdump-dns.js | 18 | ||||
-rw-r--r-- | test/parallel/test-heapdump-fs-promise.js | 16 | ||||
-rw-r--r-- | test/parallel/test-heapdump-http2.js | 88 | ||||
-rw-r--r-- | test/parallel/test-heapdump-inspector.js | 44 | ||||
-rw-r--r-- | test/parallel/test-heapdump-tls.js | 35 | ||||
-rw-r--r-- | test/parallel/test-heapdump-worker.js | 26 | ||||
-rw-r--r-- | test/parallel/test-heapdump-zlib.js | 17 |
7 files changed, 0 insertions, 244 deletions
diff --git a/test/parallel/test-heapdump-dns.js b/test/parallel/test-heapdump-dns.js deleted file mode 100644 index 6fe79f7dd4..0000000000 --- a/test/parallel/test-heapdump-dns.js +++ /dev/null @@ -1,18 +0,0 @@ -// Flags: --expose-internals -'use strict'; -require('../common'); -const { validateSnapshotNodes } = require('../common/heap'); - -validateSnapshotNodes('Node / ChannelWrap', []); -const dns = require('dns'); -validateSnapshotNodes('Node / ChannelWrap', [{}]); -dns.resolve('localhost', () => {}); -validateSnapshotNodes('Node / ChannelWrap', [ - { - children: [ - { node_name: 'Node / node_ares_task_list', edge_name: 'task_list' }, - // `Node / ChannelWrap` (C++) -> `ChannelWrap` (JS) - { node_name: 'ChannelWrap', edge_name: 'wrapped' } - ] - } -]); diff --git a/test/parallel/test-heapdump-fs-promise.js b/test/parallel/test-heapdump-fs-promise.js deleted file mode 100644 index ca170e13a6..0000000000 --- a/test/parallel/test-heapdump-fs-promise.js +++ /dev/null @@ -1,16 +0,0 @@ -// Flags: --expose-internals -'use strict'; -require('../common'); -const { validateSnapshotNodes } = require('../common/heap'); -const fs = require('fs').promises; - -validateSnapshotNodes('Node / FSReqPromise', []); -fs.stat(__filename); -validateSnapshotNodes('Node / FSReqPromise', [ - { - children: [ - { node_name: 'FSReqPromise', edge_name: 'wrapped' }, - { node_name: 'Float64Array', edge_name: 'stats_field_array' } - ] - } -]); diff --git a/test/parallel/test-heapdump-http2.js b/test/parallel/test-heapdump-http2.js deleted file mode 100644 index caece96d01..0000000000 --- a/test/parallel/test-heapdump-http2.js +++ /dev/null @@ -1,88 +0,0 @@ -// Flags: --expose-internals -'use strict'; -const common = require('../common'); -const { recordState } = require('../common/heap'); -if (!common.hasCrypto) - common.skip('missing crypto'); -const http2 = require('http2'); - -{ - const state = recordState(); - state.validateSnapshotNodes('Node / Http2Session', []); - state.validateSnapshotNodes('Node / Http2Stream', []); -} - -const server = http2.createServer(); -server.on('stream', (stream) => { - stream.respondWithFile(__filename); -}); -server.listen(0, () => { - const client = http2.connect(`http://localhost:${server.address().port}`); - const req = client.request(); - - req.on('response', common.mustCall(() => { - const state = recordState(); - - // `Node / Http2Stream` (C++) -> Http2Stream (JS) - state.validateSnapshotNodes('Node / Http2Stream', [ - { - children: [ - // current_headers and/or queue could be empty - { node_name: 'Http2Stream', edge_name: 'wrapped' } - ] - }, - ], { loose: true }); - - // `Node / FileHandle` (C++) -> FileHandle (JS) - state.validateSnapshotNodes('Node / FileHandle', [ - { - children: [ - { node_name: 'FileHandle', edge_name: 'wrapped' } - // current_headers could be empty - ] - } - ], { loose: true }); - state.validateSnapshotNodes('Node / TCPSocketWrap', [ - { - children: [ - { node_name: 'TCP', edge_name: 'wrapped' } - ] - } - ], { loose: true }); - state.validateSnapshotNodes('Node / TCPServerWrap', [ - { - children: [ - { node_name: 'TCP', edge_name: 'wrapped' } - ] - } - ], { loose: true }); - // `Node / StreamPipe` (C++) -> StreamPipe (JS) - state.validateSnapshotNodes('Node / StreamPipe', [ - { - children: [ - { node_name: 'StreamPipe', edge_name: 'wrapped' } - ] - } - ]); - // `Node / Http2Session` (C++) -> Http2Session (JS) - state.validateSnapshotNodes('Node / Http2Session', [ - { - children: [ - { node_name: 'Http2Session', edge_name: 'wrapped' }, - { - node_name: 'Node / streams', edge_name: 'streams' - } - // outstanding_pings, outgoing_buffers, outgoing_storage, - // pending_rst_streams could be empty - ] - } - ], { loose: true }); - })); - - req.resume(); - req.on('end', common.mustCall(() => { - client.close(); - server.close(); - })); - req.end(); -}); diff --git a/test/parallel/test-heapdump-inspector.js b/test/parallel/test-heapdump-inspector.js deleted file mode 100644 index d46be57c91..0000000000 --- a/test/parallel/test-heapdump-inspector.js +++ /dev/null @@ -1,44 +0,0 @@ -// Flags: --expose-internals -'use strict'; -const common = require('../common'); - -common.skipIfInspectorDisabled(); - -const { validateSnapshotNodes } = require('../common/heap'); -const inspector = require('inspector'); - -const snapshotNode = { - children: [ - { node_name: 'Node / InspectorSession', edge_name: 'session' } - ] -}; - -// Starts with no JSBindingsConnection (or 1 if coverage enabled). -{ - const expected = []; - if (process.env.NODE_V8_COVERAGE) { - expected.push(snapshotNode); - } - validateSnapshotNodes('Node / JSBindingsConnection', expected); -} - -// JSBindingsConnection should be added. -{ - const session = new inspector.Session(); - session.connect(); - const expected = [ - { - children: [ - { node_name: 'Node / InspectorSession', edge_name: 'session' }, - { node_name: 'Connection', edge_name: 'wrapped' }, - (edge) => edge.name === 'callback' && - (edge.to.type === undefined || // embedded graph - edge.to.type === 'closure') // snapshot - ] - } - ]; - if (process.env.NODE_V8_COVERAGE) { - expected.push(snapshotNode); - } - validateSnapshotNodes('Node / JSBindingsConnection', expected); -} diff --git a/test/parallel/test-heapdump-tls.js b/test/parallel/test-heapdump-tls.js deleted file mode 100644 index fee19bf676..0000000000 --- a/test/parallel/test-heapdump-tls.js +++ /dev/null @@ -1,35 +0,0 @@ -// Flags: --expose-internals -'use strict'; -const common = require('../common'); - -if (!common.hasCrypto) - common.skip('missing crypto'); - -const { validateSnapshotNodes } = require('../common/heap'); -const net = require('net'); -const tls = require('tls'); - -validateSnapshotNodes('Node / TLSWrap', []); - -const server = net.createServer(common.mustCall((c) => { - c.end(); -})).listen(0, common.mustCall(() => { - const c = tls.connect({ port: server.address().port }); - - c.on('error', common.mustCall(() => { - server.close(); - })); - c.write('hello'); - - validateSnapshotNodes('Node / TLSWrap', [ - { - children: [ - { node_name: 'Node / NodeBIO', edge_name: 'enc_out' }, - { node_name: 'Node / NodeBIO', edge_name: 'enc_in' }, - // `Node / TLSWrap` (C++) -> `TLSWrap` (JS) - { node_name: 'TLSWrap', edge_name: 'wrapped' } - // pending_cleartext_input could be empty - ] - } - ]); -})); diff --git a/test/parallel/test-heapdump-worker.js b/test/parallel/test-heapdump-worker.js deleted file mode 100644 index 06679964a2..0000000000 --- a/test/parallel/test-heapdump-worker.js +++ /dev/null @@ -1,26 +0,0 @@ -// Flags: --expose-internals -'use strict'; -require('../common'); -const { validateSnapshotNodes } = require('../common/heap'); -const { Worker } = require('worker_threads'); - -validateSnapshotNodes('Node / Worker', []); -const worker = new Worker('setInterval(() => {}, 100);', { eval: true }); -validateSnapshotNodes('Node / Worker', [ - { - children: [ - { node_name: 'Node / uv_async_t', edge_name: 'thread_exit_async' }, - { node_name: 'Node / Environment', edge_name: 'env' }, - { node_name: 'Node / MessagePort', edge_name: 'parent_port' }, - { node_name: 'Worker', edge_name: 'wrapped' } - ] - } -]); -validateSnapshotNodes('Node / MessagePort', [ - { - children: [ - { node_name: 'Node / MessagePortData', edge_name: 'data' } - ] - } -], { loose: true }); -worker.terminate(); diff --git a/test/parallel/test-heapdump-zlib.js b/test/parallel/test-heapdump-zlib.js deleted file mode 100644 index 0f86576bd1..0000000000 --- a/test/parallel/test-heapdump-zlib.js +++ /dev/null @@ -1,17 +0,0 @@ -// Flags: --expose-internals -'use strict'; -require('../common'); -const { validateSnapshotNodes } = require('../common/heap'); -const zlib = require('zlib'); - -validateSnapshotNodes('Node / ZlibStream', []); -// eslint-disable-next-line no-unused-vars -const gunzip = zlib.createGunzip(); -validateSnapshotNodes('Node / ZlibStream', [ - { - children: [ - { node_name: 'Zlib', edge_name: 'wrapped' }, - { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' } - ] - } -]); |