diff --git a/js/net/src/lite/tracks.test.ts b/js/net/src/lite/tracks.test.ts index 00cd804a60d..36f35d3a1de 100644 --- a/js/net/src/lite/tracks.test.ts +++ b/js/net/src/lite/tracks.test.ts @@ -250,15 +250,21 @@ test("a listing past the announces cap is reset, and the session stays", async ( again.close(); }); -// Quarantined: timed out at 5 s in 2 of 30 full js/net runs under 48 CPU burners; see moq-dev/moq#8355. -test.skip("a flood of a peer's listing churn yields to the host's tasks", async () => { +// The budget's CPU slice is stubbed to pass on every check, so the yield does not depend on load +// and a short flood still spans many slices. +// biome-ignore lint/style/noRestrictedGlobals: stubs the host CPU clock the budget reads. +const host = performance; +test("a flood of a peer's listing churn yields to the host's tasks", async () => { + // Starts from the real time, since the shared budget may hold a real slice start. + let fakeNow = host.now(); + spyOn(host, "now").mockImplementation(() => (fakeNow += 5)); const { subscriber, listed } = handPlayed(); const tracks = subscriber.consume(Path.from("room")).tracks(); const peer = await listed(); // Churn of one name never reaches the announces cap, so only the budget bounds it. const flood = await bytes(async (w) => { await encodeTracksEvent(w, { kind: "added", name: "first", info }, version); - for (let i = 0; i < 20_000; i++) { + for (let i = 0; i < 1024; i++) { await encodeTracksEvent(w, { kind: "added", name: "churn", info }, version); await encodeTracksEvent(w, { kind: "removed", name: "churn" }, version); } diff --git a/quest/m0/test-flakes-3/listing-yield.md b/quest/m0/test-flakes-3/listing-yield.md deleted file mode 100644 index d4f7c9a4dbc..00000000000 --- a/quest/m0/test-flakes-3/listing-yield.md +++ /dev/null @@ -1,19 +0,0 @@ -# [S] A peer's listing churn yields to the host's tasks, unquarantined - -## Goal - -`js/net`'s "a flood of a peer's listing churn yields to the host's tasks" -(`js/net/src/lite/tracks.test.ts`) runs again and passes under a loaded -`just check`, fixed at its cause on a mocked clock or an awaited event, never -with a looser budget. - -## Plan - -Found 2026-11-14 by the [feature review](/quest/m3/release/feature-review.md)'s -first pass: [moq-dev/moq#8355](https://github.com/moq-dev/moq/pull/8355) -skipped it after it timed out at 5 s in 2 of 30 full `js/net` runs under 48 -CPU burners, while that PR fixed a different test, so no quest owned the -quarantine. Reproduce under the same load first, then decide whether the -budget loop or the test's wait is at fault, following this epic's rules. - -Public API: none. Wire: none.