diff --git a/js/net/src/broadcast.test.ts b/js/net/src/broadcast.test.ts index dcd8a0bd4fb..182696e672a 100644 --- a/js/net/src/broadcast.test.ts +++ b/js/net/src/broadcast.test.ts @@ -503,16 +503,18 @@ test("a stalled consumer does not pin evicted groups", async () => { clock.jump(Nano.fromMilli(Milli(10_000))); const broadcast = new BroadcastProducer(); - const producer = broadcast.createTrack("video", { timescale: Timescale.MILLI, maxAge: Milli(1000) }); + const producer = broadcast.createTrack("video", { timescale: Timescale.MILLI }); - // A subscriber that never reads. Its sink must not grow without bound. - const stalled = broadcast.track("video").subscribe(); + // A subscriber that never reads. Its sink must not grow without bound. No max delay, + // so only eviction (not a skip of a superseded group) can drop the old group. + const stalled = broadcast.track("video").subscribe({ maxDelay: null }); producer.writeFrame(textFrame("old")); - // Advance past the cache window and write again to trigger a prune. The old - // (closed, aged-out) group is dropped from the stalled sink, not retained. - clock.jump(Nano.fromMilli(Milli(2_000))); + // Advance past the cache window, plus the scan slice a prune may lag by, and write + // again to trigger a prune. The old (closed, aged-out) group is dropped from the + // stalled sink, not retained. + clock.jump(Nano.fromMilli(Milli(30_000 + 30_000 / 8))); producer.writeFrame(textFrame("fresh")); // The next group in arrival order is the fresh one (seq 1): the old (seq 0) group diff --git a/quest/m1/README.md b/quest/m1/README.md index ec184dd6023..aaa1e89be83 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -176,7 +176,6 @@ per-frame CPU growth since #5926. - [CI housekeeping](/quest/m1/ci-housekeeping.md) - remove the actionlint queue ignore once a release after 1.7.12 reaches the dev shell - [crates.io trusts the workflow](/quest/m1/crates-trusted-publisher.md) - maintainer action: every published crate gets a trusted publisher for `release-rs.yml` - [Rust releases publish through OIDC](/quest/m1/release-rs-oidc.md) - release-plz publishes with trusted publishing and `CARGO_REGISTRY_TOKEN` is revoked -- [The JS stalled-consumer eviction test ages its groups](/quest/m1/js-cache-age-test.md) - the test drives the clock the cache reads, so it can fail - [Main is no slower than release](/quest/m1/release-perf/README.md) - every benchmark where main is slower than release is fixed or accepted with a reason, checked by a final paired run before the cut - [Interop coverage](/quest/m1/interop-coverage/README.md) - the riskiest moq-transport features moq-net exposes get cross-implementation tests over drafts 18 and 22 - [Calibrate the paired nightly benchmarks](/quest/m1/bench-ci.md) - A/A and deliberately slowed Nightly runs set the paired comparison's threshold, so its regression alerts can be trusted diff --git a/quest/m1/js-cache-age-test.md b/quest/m1/js-cache-age-test.md deleted file mode 100644 index e062b2a8538..00000000000 --- a/quest/m1/js-cache-age-test.md +++ /dev/null @@ -1,18 +0,0 @@ -# [XS] The JS stalled-consumer eviction test ages its groups - -## Goal - -`js/net/src/broadcast.test.ts` "a stalled consumer does not pin evicted -groups" ages its groups past `maxAge` on the clock the cache actually reads, -so it fails if a stalled consumer does pin evicted groups. - -## Plan - -Decided 2026-10-29 (maintainer), a follow-up of -[moq-dev/moq#7076](https://github.com/moq-dev/moq/pull/7076). The test calls -`setSystemTime`, but the cache ages groups on the monotonic clock, so that -step does nothing. Drive a `Manual` clock past `maxAge` instead, as the -other converted tests do, and restore the ambient clock when it finishes. -Prove the test fails when the consumer is made to pin evicted groups. - -Public API: none. Wire: none.