mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
87f6804b80
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>
36 lines
930 B
JavaScript
36 lines
930 B
JavaScript
// 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
|
|
]
|
|
}
|
|
]);
|
|
}));
|