fix(test): bound rpc process tree sampling · openclaw/openclaw@a823cb2
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2034,6 +2034,23 @@ describe("kitchen-sink RPC process sampling", () => {
|
2034 | 2034 | }); |
2035 | 2035 | }); |
2036 | 2036 | |
| 2037 | +it("does not loop forever on self-parenting POSIX process rows", async () => { |
| 2038 | +const sample = await sampleProcess(4321, { |
| 2039 | +platform: "linux", |
| 2040 | +runCommand: async () => ({ |
| 2041 | +stdout: " 4321 4321 262144 12.5 node dist/index.js gateway --port 19080", |
| 2042 | +stderr: "", |
| 2043 | +}), |
| 2044 | +}); |
| 2045 | + |
| 2046 | +expect(sample).toEqual({ |
| 2047 | +aggregateRssMiB: 256, |
| 2048 | +cpuPercent: 12.5, |
| 2049 | +processId: 4321, |
| 2050 | +rssMiB: 256, |
| 2051 | +}); |
| 2052 | +}); |
| 2053 | + |
2037 | 2054 | it("samples the POSIX gateway child instead of the pnpm launcher", async () => { |
2038 | 2055 | const sample = await sampleProcess(4321, { |
2039 | 2056 | platform: "linux", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。