GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: move `test-tls-autoselectfamily-servername` to `test/internet` · nodejs/node@ba340a0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/internet
    • test-tls-autoselectfamily-servername.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/internet/test-tls-autoselectfamily-servername.js‎

Copy file name to clipboard
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const { addresses: { INET_HOST } } = require('../common/internet');
5+
6+
if (!common.hasCrypto) {
7+
common.skip('missing crypto');
8+
}
9+
10+
const { setDefaultAutoSelectFamilyAttemptTimeout } = require('net');
11+
const { connect } = require('tls');
12+
13+
// Some of the windows machines in the CI need more time to establish connection
14+
setDefaultAutoSelectFamilyAttemptTimeout(common.platformTimeout(common.isWindows ? 1500 : 250));
15+
16+
// Test that TLS connecting works without autoSelectFamily
17+
{
18+
const socket = connect({
19+
host: INET_HOST,
20+
port: 443,
21+
servername: INET_HOST,
22+
autoSelectFamily: false,
23+
});
24+
25+
socket.on('secureConnect', common.mustCall(() => socket.end()));
26+
}
27+
28+
// Test that TLS connecting works with autoSelectFamily
29+
{
30+
const socket = connect({
31+
host: INET_HOST,
32+
port: 443,
33+
servername: INET_HOST,
34+
autoSelectFamily: true,
35+
});
36+
37+
socket.on('secureConnect', common.mustCall(() => socket.end()));
38+
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.