@jskit-ai/connectors-catalog 0.1.63 → 0.1.64
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/package.json +1 -1
- package/test/wiz.test.js +9 -3
package/package.json
CHANGED
package/test/wiz.test.js
CHANGED
|
@@ -172,10 +172,16 @@ test("Wiz cancellation and timeout terminate the scan process group and remove i
|
|
|
172
172
|
assert.ok(run?.childPid); controller.abort(); await rejected;
|
|
173
173
|
await assert.rejects(access(run.cwd), { code: "ENOENT" });
|
|
174
174
|
assert.throws(() => process.kill(run.pid, 0), { code: "ESRCH" });
|
|
175
|
-
//
|
|
175
|
+
// The group's SIGKILL reaches the grandchild asynchronously, and a killed
|
|
176
|
+
// grandchild can briefly remain a zombie until the host reaps it.
|
|
176
177
|
if (process.platform === "linux") {
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
let childState;
|
|
179
|
+
for (let i = 0; i < 100; i++) {
|
|
180
|
+
childState = await readFile(`/proc/${run.childPid}/stat`, "utf8").catch(() => "");
|
|
181
|
+
if (childState === "" || /\) Z /u.test(childState)) break;
|
|
182
|
+
await delay(20);
|
|
183
|
+
}
|
|
184
|
+
assert.ok(childState === "" || /\) Z /u.test(childState), childState);
|
|
179
185
|
}
|
|
180
186
|
await assert.rejects(createWizScanner({ ...f.options, timeoutMs: 200 }).scan(args), { code: "connector_timeout" });
|
|
181
187
|
const timeoutRun = await f.invocation(); await assert.rejects(access(timeoutRun.cwd), { code: "ENOENT" });
|