Skip to content

Commit 6f08927

Browse files
committed
test(signals): give the attribution-holds tier tests a wide infoMs margin
At 8cac5f0 the fast page's hold crossed the 20 ms infoMs on a loaded runner (the 5 ms until() polls stretched), so LONG_HOLD fired where the test expects none. infoMs is now 200 ms and the slow page waits 250 ms; the tier assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0117BoWNSSgtemsSYsaX2hXE
1 parent dd60ef7 commit 6f08927

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎packages/signals/tests/attribution-holds.test.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ describe("SILENT_HOLD", () => {
325325
});
326326

327327
it("tiers by duration: below infoMs nothing, between info and warn an advisory", async () => {
328-
const { events, warn } = arm({ infoMs: 20, warnMs: 10_000 });
328+
const { events, warn } = arm({ infoMs: 200, warnMs: 10_000 });
329329
const feed = pagedFeed();
330330
createRoot(() => feed.reading());
331331
flush();
@@ -343,7 +343,9 @@ describe("SILENT_HOLD", () => {
343343
// Slow round-trip: advisory only — structured event, no console.
344344
feed.setPage(3);
345345
flush();
346-
await wait(40);
346+
// Past infoMs by a clear margin; the fast page stays well under it even
347+
// when a loaded CI runner stretches the 5 ms polls.
348+
await wait(250);
347349
feed.resolve("c");
348350
await until(() => feed.shown.includes("c-p3"), "slow page");
349351
expect(attribution.history("hold")).toHaveLength(2);
@@ -536,7 +538,7 @@ describe("LONG_HOLD", () => {
536538
});
537539

538540
it("tiers: below infoMs nothing, between info and warn an advisory", async () => {
539-
const { longEvents, warn } = arm(NEVER, { infoMs: 20, warnMs: 10_000 });
541+
const { longEvents, warn } = arm(NEVER, { infoMs: 200, warnMs: 10_000 });
540542
const feed = pagedFeed();
541543
createRoot(() => {
542544
feed.reading();
@@ -558,7 +560,9 @@ describe("LONG_HOLD", () => {
558560

559561
feed.setPage(3);
560562
flush();
561-
await wait(40);
563+
// Past infoMs by a clear margin; the fast page stays well under it even
564+
// when a loaded CI runner stretches the 5 ms polls.
565+
await wait(250);
562566
feed.resolve("c");
563567
await until(() => feed.shown.includes("c-p3"), "slow page");
564568
expect(longEvents).toHaveLength(1);

0 commit comments

Comments
 (0)