diff --git a/js/net/src/lite/datagram-tracks.test.ts b/js/net/src/lite/datagram-tracks.test.ts index 6be4ab8f6d..50e541af7b 100644 --- a/js/net/src/lite/datagram-tracks.test.ts +++ b/js/net/src/lite/datagram-tracks.test.ts @@ -112,8 +112,7 @@ test("lite-04 refuses datagram tracks at setup", async () => { } }); -// Quarantined: flaky under load, see /quest/m0/test-flakes-2/datagram-queues.md -test.skip("lite-07 bounds and prioritizes independent createWritable datagram queues", async () => { +test("lite-07 bounds and prioritizes independent createWritable datagram queues", async () => { const source = new Origin(); const publication = source.route(path, { hidden: true }); const datagrams = publication.broadcast.createDatagrams("audio"); @@ -134,6 +133,10 @@ test.skip("lite-07 bounds and prioritizes independent createWritable datagram qu try { await reader.info(); while (datagrams.priority.peek() !== 19) await datagrams.priority.changed(); + // The publisher opens a track's queue after writing its DATAGRAMS_INFO, so the reader can + // see the info first: a datagram through each queue is what proves both are open. + datagrams.append(undefined, new Uint8Array([0])); + expect((await reader.recv())?.sequence).toBe(0n); await second.info(); other.append(undefined, new Uint8Array([1])); await second.recv(); @@ -151,7 +154,7 @@ test.skip("lite-07 bounds and prioritizes independent createWritable datagram qu // Type, Subscribe ID, and Sequence each occupy one byte on this untimed track. datagrams.append(undefined, new Uint8Array(898)); datagrams.append(undefined, new Uint8Array(897)); - expect((await reader.recv())?.sequence).toBe(1n); + expect((await reader.recv())?.sequence).toBe(2n); } finally { second.close(); reader.close(); diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 2e868b9b90..00379061cf 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -259,11 +259,17 @@ Added 2026-11-09 (maintainer, /quest-complete): interop's `finish` cases with a cpp or rust publisher, which failed under a loaded host and passed on rerun. They are quarantined until their child fixes them. +Resolved 2026-11-09 (maintainer, `/quest-complete`): `js/net`'s lite-07 +createWritable datagram queue test failed only on code predating [moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195): a write +that yielded after handing DATAGRAMS_INFO over left the first track's queue +unopened while the reader went on. The test now reads a datagram through that +queue before counting queues, fixed by +[moq-dev/moq#8396](https://github.com/moq-dev/moq/pull/8396). + Public API: none. Wire: none. ## Required - [js/common's worklet dev-server test holds up under load](/quest/m0/test-flakes-2/worklet-dev-server.md) - the dev-server test passes on a loaded host, and its `test.skip` is removed -- [js/net's lite-07 datagram queue test holds up under load](/quest/m0/test-flakes-2/datagram-queues.md) - the test waits for the first track's queue instead of asserting at once, and its `test.skip` is removed - [Interop's finish cases hold up under load](/quest/m0/test-flakes-2/interop-finish.md) - every publisher's finish cells pass under load, and the scenario's quarantine is removed - [The Go wrapper's cancelled-RecvGroup test holds up under load](/quest/m0/test-flakes-2/go-recv-cancel.md) - a `RecvGroup` after a cancelled one is woken by the next group, and its `t.Skip` is removed diff --git a/quest/m0/test-flakes-2/datagram-queues.md b/quest/m0/test-flakes-2/datagram-queues.md deleted file mode 100644 index baf43b71eb..0000000000 --- a/quest/m0/test-flakes-2/datagram-queues.md +++ /dev/null @@ -1,25 +0,0 @@ -# [XS] js/net's lite-07 datagram queue test holds up under load - -## Goal - -`js/net/src/lite/datagram-tracks.test.ts`'s "lite-07 bounds and prioritizes -independent createWritable datagram queues" passes on a loaded host, and its -`test.skip` is removed. - -## Plan - -Planned 2026-11-09 (maintainer, /quest-complete follow-up of -[moq-dev/moq#8276](https://github.com/moq-dev/moq/pull/8276)), under the -repository's flaky-test rule. It failed once during a full `just check` on -#8276's branch and passed 8 of 8 times alone and in later runs. - -Suspected, not confirmed: the test asserts -`pair.server.sendStreams.datagrams` has two queues right after -`second.recv()`, but nothing orders the first track's queue before that -point, so under load it may not exist yet. Reproduce it first, under load as -the epic describes. Then wait on the event that creates the queue rather than -asserting at once. If the publisher can deliver on the second track before -creating the first track's queue when both were subscribed first, decide -whether that is a bug before changing only the test. - -Public API: none. Wire: none.