Skip to content
Prev Previous commit
fixup! test: windows fanned test failed
various pipe connect API failed in parallel/test-net-connect-options-path.
  • Loading branch information
legendecas committed May 19, 2021
commit d5d6ee71b152c9e3f943f5d5cb030b4a04b30d7d
2 changes: 1 addition & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const localIPv6Hosts =

const PIPE = (() => {
const localRelative = path.relative(process.cwd(), `${tmpdir.path}/`);
const pipePrefix = isWindows ? '\\\\?\\pipe\\' : localRelative;
const pipePrefix = isWindows ? '\\\\.\\pipe\\' : localRelative;
const pipeName = `node-test.${process.pid}.sock`;
return path.join(pipePrefix, pipeName);
})();
Expand Down
12 changes: 11 additions & 1 deletion test/report/test-report-uv-handles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
// Testcase to check reporting of uv handles.
const common = require('../common');
const tmpdir = require('../common/tmpdir');
Comment thread
richardlau marked this conversation as resolved.
const path = require('path');
if (common.isIBMi)
common.skip('IBMi does not support fs.watch()');

// This is quite similar to common.PIPE except that it uses an extended prefix
// of "\\?\pipe" on windows.
const PIPE = (() => {
const localRelative = path.relative(process.cwd(), `${tmpdir.path}/`);
const pipePrefix = common.isWindows ? '\\\\?\\pipe\\' : localRelative;
const pipeName = `node-test.${process.pid}.sock`;
return path.join(pipePrefix, pipeName);
})();

function createFsHandle(childData) {
const fs = require('fs');
// Watching files should result in fs_event/fs_poll uv handles.
Expand Down Expand Up @@ -90,7 +100,7 @@ function createUdpHandle(childData) {

function createNamedPipeHandle(childData) {
const net = require('net');
const sockPath = common.PIPE;
const sockPath = PIPE;
return new Promise((resolve) => {
const server = net.createServer((socket) => {
childData.pipe_sock_path = server.address();
Expand Down