Skip to content

Commit 6c379f4

Browse files
committed
test(daemon): Improve cross-platform sockets using pid suffix
1 parent 88f3ce9 commit 6c379f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/daemon/test/test-endo.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import '@endo/lockdown/commit-debug.js';
99
import test from 'ava';
1010
import url from 'url';
1111
import path from 'path';
12+
import os from 'os';
1213
import { E } from '@endo/far';
1314
import { makePromiseKit } from '@endo/promise-kit';
1415
import {
@@ -29,8 +30,8 @@ const locator = {
2930
cachePath: path.join(dirname, 'tmp/cache'),
3031
sockPath:
3132
process.platform === 'win32'
32-
? raw`\\?\pipe\endo-test.sock`
33-
: path.join(dirname, 'tmp/endo.sock'),
33+
? raw`\\?\pipe\endo-test-${process.pid}.sock`
34+
: path.join(os.tmpdir(), `endo-test-${process.pid}.sock`),
3435
};
3536

3637
test.serial('lifecycle', async t => {

0 commit comments

Comments
 (0)