fix: 保证 Web observer 有界收尾
复用 stop-once 生命周期覆盖成功、失败、部分启动与异常兜底路径。\n\n将 YAML 派生的 maxRun/maxSamples 投影到 manifest 和 heartbeat,并补齐聚焦回归测试。
This commit is contained in:
@@ -171,6 +171,22 @@ test("observe start selects the YAML public origin semantically", () => {
|
||||
assert.equal(options.browserProxyModeSource, "yaml-origin");
|
||||
});
|
||||
|
||||
test("observe start inherits finite observer lifecycle limits from the owning YAML", () => {
|
||||
const options = parseNodeWebProbeObserveOptions(
|
||||
["start"],
|
||||
"NC01",
|
||||
"v03",
|
||||
spec,
|
||||
null,
|
||||
null,
|
||||
);
|
||||
|
||||
assert.equal(options.maxRunSeconds, 3600);
|
||||
assert.equal(options.maxSamples, 720);
|
||||
assert.ok(options.maxRunSeconds > 0);
|
||||
assert.ok(options.maxSamples > 0);
|
||||
});
|
||||
|
||||
test("observe start refuses URL-based internal/public selection ambiguity", () => {
|
||||
assert.throws(
|
||||
() => parseNodeWebProbeObserveOptions(
|
||||
|
||||
Reference in New Issue
Block a user