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 7a5ae34

Browse filesBrowse files
Trottjasnell
authored andcommitted
test: refresh temp directory when using pipe
common.PIPE resides in the temp directory (except on Windows). Insure that the temp directory is refreshed in tests that use common.PIPE. PR-URL: #3231 Fixes: #3227 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
1 parent 40a159e commit 7a5ae34
Copy full SHA for 7a5ae34
Expand file treeCollapse file tree

12 files changed

+19
-4
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-async-wrap-check-providers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-async-wrap-check-providers.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ new (process.binding('tty_wrap').TTY)();
4747

4848
crypto.randomBytes(1, noop);
4949

50-
try {
51-
fs.unlinkSync(common.PIPE);
52-
} catch(e) { }
50+
common.refreshTmpDir();
5351

5452
net.createServer(function(c) {
5553
c.end();
Collapse file

‎test/parallel/test-cluster-eaccess.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-eaccess.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ if (cluster.isMaster) {
3636
});
3737

3838
} else {
39+
common.refreshTmpDir();
3940
var cp = fork(common.fixturesDir + '/listen-on-socket-and-exit.js',
4041
{ stdio: 'inherit' });
4142

Collapse file

‎test/parallel/test-http-client-pipe-end.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-client-pipe-end.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ var server = http.createServer(function(req, res) {
1414
});
1515
});
1616

17+
common.refreshTmpDir();
18+
1719
server.listen(common.PIPE, function() {
1820
var req = http.request({
1921
socketPath: common.PIPE,
Collapse file

‎test/parallel/test-http-client-response-domain.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-client-response-domain.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ process.on('exit', function() {
1111
assert(gotDomainError);
1212
});
1313

14+
common.refreshTmpDir();
15+
1416
// first fire up a simple HTTP server
1517
var server = http.createServer(function(req, res) {
1618
res.writeHead(200);
Collapse file

‎test/parallel/test-http-unix-socket.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-unix-socket.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ var server = http.createServer(function(req, res) {
1818
res.end();
1919
});
2020

21+
common.refreshTmpDir();
22+
2123
server.listen(common.PIPE, function() {
2224

2325
var options = {
Collapse file

‎test/parallel/test-net-pingpong.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-pingpong.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function pingPongTest(port, host) {
106106
}
107107

108108
/* All are run at once, so run on different ports */
109-
console.log(common.PIPE);
109+
common.refreshTmpDir();
110110
pingPongTest(common.PIPE);
111111
pingPongTest(common.PORT);
112112
pingPongTest(common.PORT + 1, 'localhost');
Collapse file

‎test/parallel/test-net-pipe-connect-errors.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-pipe-connect-errors.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if (common.isWindows) {
2121
} else {
2222
// use common.PIPE to ensure we stay within POSIX socket path length
2323
// restrictions, even on CI
24+
common.refreshTmpDir();
2425
emptyTxt = common.PIPE + '.txt';
2526

2627
function cleanup() {
Collapse file

‎test/parallel/test-repl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var common = require('../common');
33
var assert = require('assert');
44

55
common.globalCheck = false;
6+
common.refreshTmpDir();
67

78
var net = require('net'),
89
repl = require('repl'),
Collapse file

‎test/parallel/test-tls-connect-pipe.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-connect-pipe.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ var options = {
1818
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
1919
};
2020

21+
common.refreshTmpDir();
22+
2123
var server = tls.Server(options, function(socket) {
2224
++serverConnected;
2325
server.close();
Collapse file

‎test/sequential/test-pipe-address.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-pipe-address.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ var server = net.createServer(function() {
99
assert(false); // should not be called
1010
});
1111

12+
common.refreshTmpDir();
13+
1214
server.listen(common.PIPE, function() {
1315
address = server.address();
1416
server.close();

0 commit comments

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