diff --git a/.mocharc.js b/.mocharc.js index 25274c01..bbba0d97 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -8,8 +8,9 @@ const config = { "v8-expose-gc": true, exit: true, parallel: true, - timeout: 10000, - retries: 3, + timeout: 5000, + retries: 2, + fullTrace: true } module.exports = config diff --git a/package.json b/package.json index 7298359d..da645081 100644 --- a/package.json +++ b/package.json @@ -98,8 +98,9 @@ "build.native.debug": "cmake-ts dev-os-only", "build": "run-p build.js build.native", "build.debug": "run-s build.js build.native.debug", - "test": "run-s clean.temp build test.run", - "test.run": "cross-env INCLUDE_COMPAT_TESTS=true mocha", + "test": "run-s clean.temp test.unit.compat clean.temp test.unit", + "test.unit": "cross-env INCLUDE_COMPAT_TESTS=false mocha ./test/unit/*-test.ts", + "test.unit.compat": "cross-env INCLUDE_COMPAT_TESTS=true mocha ./test/unit/compat/*-test.ts", "test.smoke": "bash ./script/smoke-test.bash", "test.skip_gc_tests": "run-s clean.temp build.debug && cross-env SKIP_GC_TESTS=true mocha", "test.electron.main": "run-s clean.temp build && electron-mocha", diff --git a/test/unit/helpers.ts b/test/unit/helpers.ts index 5186f8de..005f50ec 100644 --- a/test/unit/helpers.ts +++ b/test/unit/helpers.ts @@ -19,7 +19,7 @@ if (semver.satisfies(zmq.version, ">= 4.2")) { */ let idFallback = 5000 async function getUniqueId() { - const idPath = path.resolve(__dirname, "../../tmp/id") + const idPath = path.resolve(__dirname, "../../tmp/port-id.lock") await fs.promises.mkdir(path.dirname(idPath), {recursive: true}) try { diff --git a/test/unit/proxy-router-dealer-test.ts b/test/unit/proxy-router-dealer-test.ts index f5d9a67f..51e3d945 100644 --- a/test/unit/proxy-router-dealer-test.ts +++ b/test/unit/proxy-router-dealer-test.ts @@ -89,13 +89,16 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) { rep.close() } - console.log("waiting for messages") + console.log( + `waiting for messages for proxy with ${proto} router/dealer...`, + ) await Promise.all([echo(), send()]) assert.deepEqual(received, messages) proxy.terminate() await done + console.log(`Done proxying with ${proto} router/dealer`) }) }) })