2023-05-26 22:28:34 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
const { addresses } = require('../common/internet');
|
|
|
|
|
|
|
|
if (!common.hasCrypto)
|
|
|
|
common.skip('missing crypto');
|
|
|
|
|
|
|
|
const assert = require('assert');
|
|
|
|
const { request } = require('https');
|
|
|
|
|
|
|
|
request(
|
|
|
|
`https://${addresses.INET_HOST}/en`,
|
2023-06-27 17:17:16 +08:00
|
|
|
// Purposely set this to a low value because we want all connection but the last to fail
|
2023-05-26 22:28:34 +08:00
|
|
|
{ autoSelectFamily: true, autoSelectFamilyAttemptTimeout: 10 },
|
|
|
|
(res) => {
|
|
|
|
assert.strictEqual(res.statusCode, 200);
|
|
|
|
res.resume();
|
|
|
|
},
|
|
|
|
).end();
|