Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
nodejs14.21051
PR39011.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PR39011.patch of Package nodejs14.21051
From da3c17f122f0419c125f70df5c35eb41155628c0 Mon Sep 17 00:00:00 2001 From: Adam Majer <amajer@suse.de> Date: Fri, 11 Jun 2021 20:21:22 +0200 Subject: [PATCH] test: use localhost test instead of connecting to remote Fixes: https://github.com/nodejs/node/issues/39008 --- .../parallel/test-https-agent-unref-socket.js | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-https-agent-unref-socket.js b/test/parallel/test-https-agent-unref-socket.js index b2863a74d817..49169b523e10 100644 --- a/test/parallel/test-https-agent-unref-socket.js +++ b/test/parallel/test-https-agent-unref-socket.js @@ -6,8 +6,24 @@ if (!common.hasCrypto) const https = require('https'); -const request = https.get('https://example.com'); +if (process.argv[2] === 'localhost') { + const request = https.get('https://localhost:' + process.argv[3]); -request.on('socket', (socket) => { - socket.unref(); -}); + request.on('socket', (socket) => { + socket.unref(); + }); +} else { + const assert = require('assert'); + const net = require('net'); + const server = net.createServer(); + server.listen(0); + server.on('listening', () => { + const port = server.address().port; + const { fork } = require('child_process'); + const child = fork(__filename, ['localhost', port], {}); + child.on('close', (exit_code) => { + server.close(); + assert.strictEqual(exit_code, 0); + }); + }); +}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor