test: only assert on first lines of TLS trace

The TLS trace data is best-effort, and enough can be dropped from pipe
buffers that only the start of the trace is detected. Only assert on the
first line of the trace, it should not get dropped, and it's enough to
check that trace was enabled via CLI.

PR-URL: https://github.com/nodejs/node/pull/28043
Fixes: https://github.com/nodejs/node/issues/27636
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Sam Roberts authored and Ruben Bridgewater committed 2019-06-17 19:49:53 +02:00
1 parent 9dd4813008
commit 1ef2811236
2 files changed
-3

No files matched your search

-2
View File
@@ -9,8 +9,6 @@ prefix parallel
test-net-connect-options-port: PASS,FLAKY
# https://github.com/nodejs/node/issues/26401
test-worker-prof: PASS,FLAKY
# https://github.com/nodejs/node/issues/27553
test-tls-enable-trace-cli: PASS,FLAKY
[$system==win32]
test-http2-pipe: PASS,FLAKY
@@ -37,7 +37,6 @@ child.on('close', common.mustCall((code, signal) => {
assert.strictEqual(stdout.trim(), '');
assert(/Warning: Enabling --trace-tls can expose sensitive/.test(stderr));
assert(/Sent Record/.test(stderr));
assert(/Received Record/.test(stderr));
}));
function test() {