Skip to content

Commit 7e9f5ea

Browse files
sam-githubaddaleax
authored andcommitted
test: pin regression test for #8074 to TLS 1.2
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: - #13184 (comment) PR-URL: #25508 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2b1f881 commit 7e9f5ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/parallel/test-tls-socket-close.js

+13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ const tls = require('tls');
88
const net = require('net');
99
const fixtures = require('../common/fixtures');
1010

11+
// Regression test for https://github.com/nodejs/node/issues/8074
12+
//
13+
// This test has a dependency on the order in which the TCP connection is made,
14+
// and TLS server handshake completes. It assumes those server side events occur
15+
// before the client side write callback, which is not guaranteed by the TLS
16+
// API. It usally passes with TLS1.3, but TLS1.3 didn't exist at the time the
17+
// bug existed.
18+
//
19+
// Pin the test to TLS1.2, since the test shouldn't be changed in a way that
20+
// doesn't trigger a segfault in Node.js 7.7.3:
21+
// https://github.com/nodejs/node/issues/13184#issuecomment-303700377
22+
tls.DEFAULT_MAX_VERSION = 'TLSv1.2';
23+
1124
const key = fixtures.readKey('agent2-key.pem');
1225
const cert = fixtures.readKey('agent2-cert.pem');
1326

0 commit comments

Comments
 (0)