@itwin/build-tools 4.2.0-dev.22 → 4.2.0-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mocha-reporter/index.js +3 -3
- package/package.json +1 -1
package/mocha-reporter/index.js
CHANGED
@@ -78,9 +78,9 @@ class BentleyMochaReporter extends Spec {
|
|
78
78
|
// Detect hangs caused by tests that leave timers/other handles open - not possible in electron frontends.
|
79
79
|
if (!("electron" in process.versions)) {
|
80
80
|
// NB: By calling unref() on this timer, we stop it from keeping the process alive, so it will only fire if _something else_ is still keeping
|
81
|
-
// the process alive after
|
81
|
+
// the process alive after 30 seconds. This also has the benefit of preventing the timer from showing up in wtfnode's dump of open handles.
|
82
82
|
setTimeout(() => {
|
83
|
-
logBuildError(`Handle leak detected. Node was still running
|
83
|
+
logBuildError(`Handle leak detected. Node was still running 30 seconds after tests completed.`);
|
84
84
|
if (debugLeaks) {
|
85
85
|
const wtf = require("wtfnode");
|
86
86
|
wtf.setLogger("info", console.error);
|
@@ -100,7 +100,7 @@ class BentleyMochaReporter extends Spec {
|
|
100
100
|
}
|
101
101
|
// Not sure why, but process.exit(1) wasn't working here...
|
102
102
|
process.kill(process.pid);
|
103
|
-
},
|
103
|
+
}, 30 * 1000).unref();
|
104
104
|
}
|
105
105
|
if (!this.stats.pending)
|
106
106
|
return;
|