Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19ed33d

Browse filesBrowse files
Trottrvagg
authored andcommitted
test: skip test if in FreeBSD jail
Test test-net-socket-local-address is flaky in FreeBSD jail but robust otherwise. Fixes: #2475 PR-URL: #3995 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent baac81d commit 19ed33d
Copy full SHA for 19ed33d

File tree

Expand file treeCollapse file tree

2 files changed

+13
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-8
lines changed
Open diff view settings
Collapse file

‎test/parallel/parallel.status‎

Copy file name to clipboardExpand all lines: test/parallel/parallel.status
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ test-child-process-exit-code : PASS,FLAKY
1919
[$system==solaris] # Also applies to SmartOS
2020

2121
[$system==freebsd]
22-
test-net-socket-local-address : PASS,FLAKY
Collapse file

‎test/parallel/test-net-socket-local-address.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-socket-local-address.js
+13-7Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
4-
var net = require('net');
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const net = require('net');
5+
6+
// skip test in FreeBSD jails
7+
if (common.inFreeBSDJail) {
8+
console.log('1..0 # Skipped: In a FreeBSD jail');
9+
return;
10+
}
511

612
var conns = 0;
713
var clientLocalPorts = [];
814
var serverRemotePorts = [];
915

10-
var server = net.createServer(function(socket) {
16+
const server = net.createServer(function(socket) {
1117
serverRemotePorts.push(socket.remotePort);
1218
conns++;
1319
});
1420

15-
var client = new net.Socket();
21+
const client = new net.Socket();
1622

17-
server.on('close', function() {
23+
server.on('close', common.mustCall(function() {
1824
assert.deepEqual(clientLocalPorts, serverRemotePorts,
1925
'client and server should agree on the ports used');
2026
assert.equal(2, conns);
21-
});
27+
}));
2228

2329
server.listen(common.PORT, common.localhostIPv4, testConnect);
2430

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.