From 18f738a7a1dfdb2dea96c9d442ed514d37c1d330 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 15 Oct 2026 22:23:37 -0700 Subject: [PATCH 1/6] quest: claim m0/ci/test-cost Co-Authored-By: Claude Opus 5.5 From fc10fcc92bfb14fed2944d09eb6b04b3981561c8 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 15 Oct 2026 22:58:14 -0700 Subject: [PATCH 2/6] test: link each crate's integration tests into one binary moq-net, moq-relay, moq-tokio, and moq-uring linked one test binary per tests/*.rs file, 89 in all, each relinking the crate and its dependencies. Fold them into tests/integration/ modules, leaving 8 binaries: drills, allocations, loom, and wasm stay apart. The moq-cli play pass now runs only the binary's own tests, since its integration tests exercise no play code and the default pass runs them. Co-Authored-By: Claude Opus 5.5 --- .config/nextest.toml | 2 +- .github/workflows/interop.yml | 2 +- js/net/src/untimed.test.ts | 2 +- quest/m0/ci/README.md | 1 - quest/m0/ci/setup-cost.md | 4 ++ quest/m0/ci/test-cost.md | 25 --------- quest/m0/relay-windows-stack.md | 4 +- quest/m1/close-tail-drain.md | 2 +- quest/m1/cluster-routing/routes.md | 4 +- quest/m1/lite07-finalize.md | 2 +- quest/m1/probe-on-demand-rs.md | 2 +- quest/m1/restart-followers.md | 4 +- .../test-flakes-2/auth-refresh-mock-time.md | 2 +- .../m1/test-flakes-2/uring-teardown-close.md | 2 +- quest/m1/time/relay-seam.md | 2 +- quest/m1/time/uring.md | 2 +- quest/m2/uring-connection-log.md | 2 +- quest/m2/uring-ietf.md | 2 +- quest/m3/hidden-exemption.md | 2 +- quest/m3/uring-tcp/relay.md | 2 +- rs/justfile | 6 +- rs/moq-net/benches/auth.rs | 2 +- rs/moq-net/benches/origin.rs | 2 +- rs/moq-net/benches/session.rs | 2 +- .../announce_covering_route.rs | 2 +- .../{ => integration}/announce_to_serve.rs | 2 +- rs/moq-net/tests/{ => integration}/auth.rs | 2 +- .../{ => integration}/broadcast_close.rs | 2 +- .../{ => integration}/catalog_acquisition.rs | 2 +- .../tests/{ => integration}/datagram.rs | 2 +- .../{ => integration}/dial_split_horizon.rs | 2 +- .../tests/{ => integration}/drained_claim.rs | 2 +- .../tests/{ => integration}/empty_group.rs | 2 +- .../tests/{ => integration}/extensions.rs | 2 +- .../tests/{ => integration}/fetch_cancel.rs | 2 +- .../tests/{ => integration}/fetch_caps.rs | 2 +- .../{ => integration}/fetch_from_feed.rs | 2 +- .../tests/{ => integration}/fetch_only.rs | 2 +- .../finished_broadcast_mock.rs | 2 +- .../tests/{ => integration}/finite_relay.rs | 2 +- rs/moq-net/tests/{ => integration}/goaway.rs | 2 +- .../tests/{ => integration}/group_charge.rs | 0 .../tests/{ => integration}/group_order.rs | 2 +- .../tests/{ => integration}/head_fetch.rs | 2 +- .../tests/{ => integration}/history_groups.rs | 2 +- .../{ => integration}/idle_cancel_refetch.rs | 2 +- .../tests/{ => integration}/idle_session.rs | 2 +- .../{ => integration}/late_lower_group.rs | 2 +- rs/moq-net/tests/integration/main.rs | 55 +++++++++++++++++++ .../tests/{ => integration}/mesh_withdraw.rs | 2 +- rs/moq-net/tests/{ => integration}/model.rs | 0 .../tests/{ => integration}/multi_cdn.rs | 2 +- .../tests/{ => integration}/quiet_catalog.rs | 2 +- rs/moq-net/tests/{ => integration}/rejoin.rs | 2 +- .../tests/{ => integration}/replacement.rs | 2 +- .../tests/{ => integration}/request_caps.rs | 2 +- rs/moq-net/tests/{ => integration}/restart.rs | 2 +- .../tests/{ => integration}/route_change.rs | 2 +- .../routing_contracts/mod.rs} | 0 .../routing_contracts/model.rs | 0 .../tests/{ => integration}/session_close.rs | 2 +- .../tests/{ => integration}/session_panic.rs | 2 +- .../settled_end_survives_abort.rs | 2 +- .../{ => integration}/subscribe_tracks.rs | 2 +- .../subscription_end_integrity.rs | 2 +- .../{ => integration}/support/harness.rs | 0 .../tests/{ => integration}/support/mock.rs | 0 .../tests/{ => integration}/support/mod.rs | 2 + .../track_abort_over_session.rs | 2 +- .../{ => integration}/track_info_cancel.rs | 2 +- .../{ => integration}/track_stream_demand.rs | 2 +- .../tests/{ => integration}/track_tail.rs | 2 +- .../{ => integration}/unannounce_release.rs | 2 +- rs/moq-net/tests/{ => integration}/untimed.rs | 2 +- .../tests/{ => integration}/wide_sequence.rs | 2 +- .../tests/{ => integration}/zero_copy.rs | 2 +- .../tests/{ => integration}/auth_embedder.rs | 0 .../tests/{ => integration}/auth_lifetime.rs | 0 .../tests/{ => integration}/cluster_idle.rs | 0 .../{ => integration}/cluster_unknown.rs | 0 rs/moq-relay/tests/{ => integration}/embed.rs | 0 .../tests/{ => integration}/goaway_cluster.rs | 0 .../tests/{ => integration}/hidden_cluster.rs | 0 .../tests/{ => integration}/lan_mesh.rs | 0 rs/moq-relay/tests/integration/main.rs | 24 ++++++++ .../tests/{ => integration}/public_rules.rs | 0 .../tests/{ => integration}/refusals.rs | 0 .../tests/{ => integration}/released_cli.rs | 0 .../tests/{ => integration}/runtime_uring.rs | 0 .../{ => integration}/runtime_workers.rs | 0 .../{ => integration}/session_revalidate.rs | 0 .../{ => integration}/shutdown_signal.rs | 0 rs/moq-relay/tests/{ => integration}/smoke.rs | 0 .../tests/{ => integration}/upstream_links.rs | 0 rs/moq-tokio/tests/{ => integration}/alpn.rs | 0 .../tests/{ => integration}/backend.rs | 0 .../tests/{ => integration}/broadcast.rs | 2 +- .../tests/{ => integration}/close_code.rs | 0 rs/moq-tokio/tests/integration/main.rs | 15 +++++ .../tests/{ => integration}/max_age.rs | 0 .../tests/{ => integration}/reconnect.rs | 0 .../tests/{ => integration}/stream_code.rs | 0 .../subscription_end_integrity.rs | 0 .../tests/{ => integration}/unannounce.rs | 0 .../tests/{ => integration}/worker.rs | 0 rs/moq-uring/benches/echo_noq.rs | 2 +- rs/moq-uring/benches/session_lite.rs | 2 +- rs/moq-uring/tests/{ => integration}/echo.rs | 3 +- rs/moq-uring/tests/{ => integration}/ecn.rs | 0 .../tests/{ => integration}/endpoint.rs | 3 +- .../tests/{ => integration}/identity.rs | 3 +- rs/moq-uring/tests/integration/main.rs | 18 ++++++ rs/moq-uring/tests/{ => integration}/qlog.rs | 3 +- .../tests/{ => integration}/session.rs | 3 +- .../tests/{ => integration}/support.rs | 0 .../tests/{ => integration}/teardown.rs | 3 +- .../tests/{ => integration}/transport.rs | 2 +- rs/moq-uring/tests/{ => integration}/web.rs | 3 +- .../tests/{ => integration}/workers.rs | 3 +- test/justfile | 2 +- test/ts/README.md | 2 +- 121 files changed, 203 insertions(+), 117 deletions(-) delete mode 100644 quest/m0/ci/test-cost.md rename rs/moq-net/tests/{ => integration}/announce_covering_route.rs (99%) rename rs/moq-net/tests/{ => integration}/announce_to_serve.rs (99%) rename rs/moq-net/tests/{ => integration}/auth.rs (99%) rename rs/moq-net/tests/{ => integration}/broadcast_close.rs (99%) rename rs/moq-net/tests/{ => integration}/catalog_acquisition.rs (99%) rename rs/moq-net/tests/{ => integration}/datagram.rs (99%) rename rs/moq-net/tests/{ => integration}/dial_split_horizon.rs (99%) rename rs/moq-net/tests/{ => integration}/drained_claim.rs (99%) rename rs/moq-net/tests/{ => integration}/empty_group.rs (99%) rename rs/moq-net/tests/{ => integration}/extensions.rs (99%) rename rs/moq-net/tests/{ => integration}/fetch_cancel.rs (99%) rename rs/moq-net/tests/{ => integration}/fetch_caps.rs (99%) rename rs/moq-net/tests/{ => integration}/fetch_from_feed.rs (99%) rename rs/moq-net/tests/{ => integration}/fetch_only.rs (99%) rename rs/moq-net/tests/{ => integration}/finished_broadcast_mock.rs (99%) rename rs/moq-net/tests/{ => integration}/finite_relay.rs (99%) rename rs/moq-net/tests/{ => integration}/goaway.rs (99%) rename rs/moq-net/tests/{ => integration}/group_charge.rs (100%) rename rs/moq-net/tests/{ => integration}/group_order.rs (99%) rename rs/moq-net/tests/{ => integration}/head_fetch.rs (99%) rename rs/moq-net/tests/{ => integration}/history_groups.rs (99%) rename rs/moq-net/tests/{ => integration}/idle_cancel_refetch.rs (99%) rename rs/moq-net/tests/{ => integration}/idle_session.rs (99%) rename rs/moq-net/tests/{ => integration}/late_lower_group.rs (99%) create mode 100644 rs/moq-net/tests/integration/main.rs rename rs/moq-net/tests/{ => integration}/mesh_withdraw.rs (99%) rename rs/moq-net/tests/{ => integration}/model.rs (100%) rename rs/moq-net/tests/{ => integration}/multi_cdn.rs (99%) rename rs/moq-net/tests/{ => integration}/quiet_catalog.rs (99%) rename rs/moq-net/tests/{ => integration}/rejoin.rs (99%) rename rs/moq-net/tests/{ => integration}/replacement.rs (99%) rename rs/moq-net/tests/{ => integration}/request_caps.rs (99%) rename rs/moq-net/tests/{ => integration}/restart.rs (99%) rename rs/moq-net/tests/{ => integration}/route_change.rs (99%) rename rs/moq-net/tests/{routing_contracts/main.rs => integration/routing_contracts/mod.rs} (100%) rename rs/moq-net/tests/{ => integration}/routing_contracts/model.rs (100%) rename rs/moq-net/tests/{ => integration}/session_close.rs (99%) rename rs/moq-net/tests/{ => integration}/session_panic.rs (99%) rename rs/moq-net/tests/{ => integration}/settled_end_survives_abort.rs (99%) rename rs/moq-net/tests/{ => integration}/subscribe_tracks.rs (99%) rename rs/moq-net/tests/{ => integration}/subscription_end_integrity.rs (99%) rename rs/moq-net/tests/{ => integration}/support/harness.rs (100%) rename rs/moq-net/tests/{ => integration}/support/mock.rs (100%) rename rs/moq-net/tests/{ => integration}/support/mod.rs (75%) rename rs/moq-net/tests/{ => integration}/track_abort_over_session.rs (99%) rename rs/moq-net/tests/{ => integration}/track_info_cancel.rs (99%) rename rs/moq-net/tests/{ => integration}/track_stream_demand.rs (99%) rename rs/moq-net/tests/{ => integration}/track_tail.rs (99%) rename rs/moq-net/tests/{ => integration}/unannounce_release.rs (98%) rename rs/moq-net/tests/{ => integration}/untimed.rs (99%) rename rs/moq-net/tests/{ => integration}/wide_sequence.rs (99%) rename rs/moq-net/tests/{ => integration}/zero_copy.rs (99%) rename rs/moq-relay/tests/{ => integration}/auth_embedder.rs (100%) rename rs/moq-relay/tests/{ => integration}/auth_lifetime.rs (100%) rename rs/moq-relay/tests/{ => integration}/cluster_idle.rs (100%) rename rs/moq-relay/tests/{ => integration}/cluster_unknown.rs (100%) rename rs/moq-relay/tests/{ => integration}/embed.rs (100%) rename rs/moq-relay/tests/{ => integration}/goaway_cluster.rs (100%) rename rs/moq-relay/tests/{ => integration}/hidden_cluster.rs (100%) rename rs/moq-relay/tests/{ => integration}/lan_mesh.rs (100%) create mode 100644 rs/moq-relay/tests/integration/main.rs rename rs/moq-relay/tests/{ => integration}/public_rules.rs (100%) rename rs/moq-relay/tests/{ => integration}/refusals.rs (100%) rename rs/moq-relay/tests/{ => integration}/released_cli.rs (100%) rename rs/moq-relay/tests/{ => integration}/runtime_uring.rs (100%) rename rs/moq-relay/tests/{ => integration}/runtime_workers.rs (100%) rename rs/moq-relay/tests/{ => integration}/session_revalidate.rs (100%) rename rs/moq-relay/tests/{ => integration}/shutdown_signal.rs (100%) rename rs/moq-relay/tests/{ => integration}/smoke.rs (100%) rename rs/moq-relay/tests/{ => integration}/upstream_links.rs (100%) rename rs/moq-tokio/tests/{ => integration}/alpn.rs (100%) rename rs/moq-tokio/tests/{ => integration}/backend.rs (100%) rename rs/moq-tokio/tests/{ => integration}/broadcast.rs (99%) rename rs/moq-tokio/tests/{ => integration}/close_code.rs (100%) create mode 100644 rs/moq-tokio/tests/integration/main.rs rename rs/moq-tokio/tests/{ => integration}/max_age.rs (100%) rename rs/moq-tokio/tests/{ => integration}/reconnect.rs (100%) rename rs/moq-tokio/tests/{ => integration}/stream_code.rs (100%) rename rs/moq-tokio/tests/{ => integration}/subscription_end_integrity.rs (100%) rename rs/moq-tokio/tests/{ => integration}/unannounce.rs (100%) rename rs/moq-tokio/tests/{ => integration}/worker.rs (100%) rename rs/moq-uring/tests/{ => integration}/echo.rs (99%) rename rs/moq-uring/tests/{ => integration}/ecn.rs (100%) rename rs/moq-uring/tests/{ => integration}/endpoint.rs (99%) rename rs/moq-uring/tests/{ => integration}/identity.rs (99%) create mode 100644 rs/moq-uring/tests/integration/main.rs rename rs/moq-uring/tests/{ => integration}/qlog.rs (99%) rename rs/moq-uring/tests/{ => integration}/session.rs (99%) rename rs/moq-uring/tests/{ => integration}/support.rs (100%) rename rs/moq-uring/tests/{ => integration}/teardown.rs (99%) rename rs/moq-uring/tests/{ => integration}/transport.rs (67%) rename rs/moq-uring/tests/{ => integration}/web.rs (99%) rename rs/moq-uring/tests/{ => integration}/workers.rs (99%) diff --git a/.config/nextest.toml b/.config/nextest.toml index a6077fa7e64..5a0c97c0ed4 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -28,7 +28,7 @@ default-filter = "not kind(bench)" # hosted CI's locked-memory limit and uses the host's hard limit locally. # Several invocations still share that user-wide budget; see rs/moq-uring/README.md. [[profile.default.overrides]] -filter = "package(moq-uring) | binary_id(moq-relay::runtime_uring) | (binary_id(moq-relay::embed) & test(/uring/))" +filter = "package(moq-uring) | (binary_id(moq-relay::integration) & (test(/^runtime_uring::/) | test(/^embed::.*uring/)))" test-group = "io-uring" # The binding benchmark runs many `MOQ_BENCH_SECONDS` budgets back to back, so its diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 676469e81a6..f1148558691 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -20,7 +20,7 @@ on: - "test/interop/**" - "test/max-age/**" - "test/portrait/**" - - "rs/moq-tokio/tests/max_age.rs" + - "rs/moq-tokio/tests/integration/max_age.rs" # The interop job also depends on the recipe that invokes it and the # workspace membership that links the JS clients to source. - "test/justfile" diff --git a/js/net/src/untimed.test.ts b/js/net/src/untimed.test.ts index d9e1ec49f8e..e839f281006 100644 --- a/js/net/src/untimed.test.ts +++ b/js/net/src/untimed.test.ts @@ -1,5 +1,5 @@ // A track keeps its timedness end to end: no receive path fills in arrival time, and a -// wire that can't declare a timeline delivers frames untimed. Mirrors rs/moq-net/tests/untimed.rs. +// wire that can't declare a timeline delivers frames untimed. Mirrors rs/moq-net/tests/integration/untimed.rs. import { expect, test } from "bun:test"; import { type Consumer as BroadcastConsumer, Producer as BroadcastProducer } from "./broadcast.ts"; import { accept, connect } from "./connection/index.ts"; diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 1b311c5a471..a9547c421c0 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -64,7 +64,6 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Pin Quest's gate](/quest/m0/ci/quest-gate-pin.md) - make shared command admission available - [Share local check capacity](/quest/m0/ci/local-gate.md) - gate expensive phases and bound internal fanout -- [Reduce test cost](/quest/m0/ci/test-cost.md) - measure and retire low-value expensive work - [Reduce setup cost](/quest/m0/ci/setup-cost.md) - select cleanup and setup from actual workload needs - [Require platform gates](/quest/m0/ci/platform-queue.md) - activate the consolidated platform checks in the main and release rulesets after the workflow lands - [mbx on R2](/quest/m0/ci/mbx-r2.md) - Rust builds on every OS read an R2 cache that only `main` writes, escaping the 10 GB Actions cache diff --git a/quest/m0/ci/setup-cost.md b/quest/m0/ci/setup-cost.md index eaf28da033e..dac54da9fee 100644 --- a/quest/m0/ci/setup-cost.md +++ b/quest/m0/ci/setup-cost.md @@ -17,5 +17,9 @@ need, reducing latency and CPU without moving the existing Check/Test gates. - Audit repeated installs and builds only where equivalent outputs can be reused. Record before/after setup and total job timings, including cache misses; avoid trading lower reported setup for hidden repeated work. +- The Dart check builds release `moq-ffi` twice: `sh/dart/generate.sh`, then + `dart test`'s build hook, probably because the hook's filtered environment + changes Cargo's fingerprint. Check [run 38853884676](https://github.com/moq-dev/moq/actions/runs/38853884676) + spent about 6.7 and 6 minutes on them; confirm the cause and reuse one build. - Decided 2026-10-15: m0. Keep hosted runners, PR Check/Test, and the platform merge-queue policy. Existing R2/Nix cache and FFI-reuse quests keep ownership. diff --git a/quest/m0/ci/test-cost.md b/quest/m0/ci/test-cost.md deleted file mode 100644 index 34eedd960f3..00000000000 --- a/quest/m0/ci/test-cost.md +++ /dev/null @@ -1,25 +0,0 @@ -# [M] Retire expensive tests with little additional signal - -## Goal - -The selected test suites consume less CPU while preserving useful regression -signal. Expensive redundant tests can be deleted, narrowed, or moved to a -lighter harness, with their lost coverage and measured savings made explicit. - -## Plan - -- Decided 2026-10-15: evidence-backed retirement is allowed. This supersedes - the CI epic's blanket requirement that every removed PR test run elsewhere. - Keep protocol, media correctness, refusal, and cross-language regressions - where they add distinct signal; fewer assertions is not itself a benefit. -- Inventory runtime and CPU by selected suite before changing tools. Compare - equivalent checks with bounded workers and realistic cold/warm caches; - retain a replacement only when its signal and cost justify it. -- Recheck mutation/drill placement. Routine advisory sensitivity runs belong - nightly when PR coverage adds no useful signal; retain cheap patch/harness - validation where source changes can invalidate the drills. Some of this - routing may already have landed, so avoid duplicating it. -- Use existing Bun and nextest capabilities before introducing another test - framework. Report each deletion's purpose, remaining regression anchor, and - measured cost, and keep retained tests reachable through normal CI routes. -- Do not duplicate existing platform-queue, FFI reuse, or cache work. diff --git a/quest/m0/relay-windows-stack.md b/quest/m0/relay-windows-stack.md index 0903264444f..d49b50c9873 100644 --- a/quest/m0/relay-windows-stack.md +++ b/quest/m0/relay-windows-stack.md @@ -20,7 +20,7 @@ Likely cause, not yet confirmed: `rs/moq-relay/src/main.rs` is one and polls that state machine on the main thread, and debug builds copy it by value several times. Logging starts inside `Config::load`, which is why nothing prints. The relay tests already sidestep this with 32 MiB threads -(`rs/moq-relay/tests/goaway_cluster.rs` and others), and +(`rs/moq-relay/tests/integration/goaway_cluster.rs` and others), and `rs/moq-relay/src/connection.rs` and `rs/moq-tokio/src/client.rs` already box large futures for the same reason. @@ -39,7 +39,7 @@ Decided 2026-10-15 (maintainer): - Windows CI adds `-p moq-relay` to `windows-test` (`rs/justfile`), so the relay's tests, the regression above included, run on Windows. That needs the tests' Unix-only expectations gated first, keeping them on Unix: - `rs/moq-relay/tests/released_cli.rs` requires the `server-unix-*` flags and + `rs/moq-relay/tests/integration/released_cli.rs` requires the `server-unix-*` flags and their env vars, which exist only under `cfg(all(feature = "uds", unix))` (`rs/moq-tokio/src/listen.rs`). diff --git a/quest/m1/close-tail-drain.md b/quest/m1/close-tail-drain.md index 6ab5d415df2..38d3561565d 100644 --- a/quest/m1/close-tail-drain.md +++ b/quest/m1/close-tail-drain.md @@ -34,7 +34,7 @@ Found while reworking the in-memory transport (#5530). Facts at 813a92b48: and IETF the receiver throws away a tail its transport already holds. lite-07 already avoids this at the protocol level: the closer waits for the subscriber's Subscribe-stream FIN (`drafts/draft-lcurley-moq-lite.md`). -- The test mock (`rs/moq-net/tests/support/mock.rs`) hid it: its FIN counts as +- The test mock (`rs/moq-net/tests/integration/support/mock.rs`) hid it: its FIN counts as acked only once the reading application stops or drops the stream. `older_lite_close_keeps_ack_drain` never checks what the reader got. diff --git a/quest/m1/cluster-routing/routes.md b/quest/m1/cluster-routing/routes.md index 01760b96702..95d67716101 100644 --- a/quest/m1/cluster-routing/routes.md +++ b/quest/m1/cluster-routing/routes.md @@ -16,7 +16,7 @@ claim whose withdrawal is already known. Keep the 2026-10-01 two-layer direction, reconciled with the maintainer's 2026-10-13 [decisions](/quest/m1/cluster-routing/README.md) and the routing contract below. The routing contract's fixtures live in -`rs/moq-net/tests/routing_contracts/` and run against a small reference model; +`rs/moq-net/tests/integration/routing_contracts/` and run against a small reference model; port each topology to the implementation as acceptance, then delete the model. The sketch stays conditional on Next-hop handoff, which settles claim freshness before coding: @@ -316,7 +316,7 @@ Open, for the implementer to settle and record: - How much of today's route trie, fronts, and `route_order` survives intact. The #4349 counterexamples are the `residual_*` tests in -`rs/moq-net/tests/mesh_withdraw.rs`. They pin today's hunting on lite-06: +`rs/moq-net/tests/integration/mesh_withdraw.rs`. They pin today's hunting on lite-06: a stale path outlasting the 300 ms hold, a revival the quarantine misses, and 179 hunting relays (3 reviving) over 200 seeded meshes. Turn each into a single retraction everywhere, and keep `cross_node_close_retracts_once` diff --git a/quest/m1/lite07-finalize.md b/quest/m1/lite07-finalize.md index 8047c39d39c..6e20dfff23f 100644 --- a/quest/m1/lite07-finalize.md +++ b/quest/m1/lite07-finalize.md @@ -47,7 +47,7 @@ The cut: draft (whose text already names the rename), and at every site spelling the wip ALPN: `rs/moq-tokio/src/connect.rs` and `listen.rs`, `rs/moq-tokio/tests/`, `rs/moq-relay/src/cluster.rs`, - `rs/moq-relay/tests/smoke.rs`, + `rs/moq-relay/tests/integration/smoke.rs`, `test/interop/bare-fin.ts`, `test/interop/lite-varint.ts`, and `doc/concept/moq-lite.md`; grep for `moq-lite-07-wip` to catch new ones. A wip peer and a final peer refuse each other by ALPN rather than misparse; no compatibility shim. diff --git a/quest/m1/probe-on-demand-rs.md b/quest/m1/probe-on-demand-rs.md index c17bc4f46c7..8a04a8a05cc 100644 --- a/quest/m1/probe-on-demand-rs.md +++ b/quest/m1/probe-on-demand-rs.md @@ -28,4 +28,4 @@ Decided (2026-10-12, quest-plan): Test: a session nobody holds a consumer for opens no PROBE stream, and one that holds then drops a consumer opens and then resets it. Reuse the mock transport -stats and the harness in `rs/moq-net/tests/idle_session.rs`. +stats and the harness in `rs/moq-net/tests/integration/idle_session.rs`. diff --git a/quest/m1/restart-followers.md b/quest/m1/restart-followers.md index 924814da6fd..a3947fa899c 100644 --- a/quest/m1/restart-followers.md +++ b/quest/m1/restart-followers.md @@ -17,7 +17,7 @@ every connect; it remains for GOAWAY drains and publisher replacement. The origin side is done: a handle resolved through a peer keeps serving new requests while the peer's epochless replacement is held, and refuses them with `Unroutable` only once the `Restart` is deliverable (`Release` in `rs/moq-net/src/model/origin.rs`, -`rs/moq-net/tests/replacement.rs`). So a consumer that never follows `Restart` +`rs/moq-net/tests/integration/replacement.rs`). So a consumer that never follows `Restart` works through the hold (300 ms by default), and its open subscriptions stay sticky on the old session until it closes, where they end cleanly. A consumer that opens a request after the hold, or reads past the old @@ -45,7 +45,7 @@ Audit and fix: - The interop clients under `test/interop/clients`, where they resolve a broadcast themselves. -Regression: extend `rs/moq-net/tests/replacement.rs` (or the consumer's own +Regression: extend `rs/moq-net/tests/integration/replacement.rs` (or the consumer's own tests) so each follower reads past the old session's close after an epochless replacement. Then run `just test interop --all`. diff --git a/quest/m1/test-flakes-2/auth-refresh-mock-time.md b/quest/m1/test-flakes-2/auth-refresh-mock-time.md index 085a1ae3401..bdc3f91d851 100644 --- a/quest/m1/test-flakes-2/auth-refresh-mock-time.md +++ b/quest/m1/test-flakes-2/auth-refresh-mock-time.md @@ -10,7 +10,7 @@ load, because they read one mocked clock instead of the host's wall clock: (`rs/moq-relay/src/auth/refresh.rs`) - `a_fixed_lease_still_expires` and `an_outage_keeps_the_session_until_expires` - (`rs/moq-relay/tests/auth_lifetime.rs`) + (`rs/moq-relay/tests/integration/auth_lifetime.rs`) ## Plan diff --git a/quest/m1/test-flakes-2/uring-teardown-close.md b/quest/m1/test-flakes-2/uring-teardown-close.md index 55d8c697656..3a24d79e80c 100644 --- a/quest/m1/test-flakes-2/uring-teardown-close.md +++ b/quest/m1/test-flakes-2/uring-teardown-close.md @@ -3,7 +3,7 @@ ## Goal `moq-uring`'s `a_published_close_has_already_left_the_client` -(`rs/moq-uring/tests/teardown.rs`) passes under a loaded `just check`, +(`rs/moq-uring/tests/integration/teardown.rs`) passes under a loaded `just check`, fixed at its cause. It still proves that a close the client reported as published reaches the server as the application code, not an idle timeout. diff --git a/quest/m1/time/relay-seam.md b/quest/m1/time/relay-seam.md index 2bf68fdcb57..1b0663601d0 100644 --- a/quest/m1/time/relay-seam.md +++ b/quest/m1/time/relay-seam.md @@ -3,7 +3,7 @@ ## Goal One in-memory session pair implements moq-net's poll transport traits and -replaces the duplicate poll-session mocks (`rs/moq-net/tests/support/mock.rs`, +replaces the duplicate poll-session mocks (`rs/moq-net/tests/integration/support/mock.rs`, `rs/moq-e2ee/tests/support/mock.rs`, and the session bench's transport). moq-tokio's `FakeSession` and `Scripted` stay: they implement `web_transport_trait::Session` to test moq-tokio's adapter onto the poll diff --git a/quest/m1/time/uring.md b/quest/m1/time/uring.md index 6151101783f..c61d8a641f4 100644 --- a/quest/m1/time/uring.md +++ b/quest/m1/time/uring.md @@ -25,7 +25,7 @@ flavors, and relay CPU via `just bench BASE` on Linux. The existing keep-alive and idle-timeout tests stay unchanged. Ban direct clock reads in moq-uring outside its backend (the ratchet). -Move `uring_workers_bound_stalled_handshakes` (`rs/moq-relay/tests/runtime_uring.rs`) +Move `uring_workers_bound_stalled_handshakes` (`rs/moq-relay/tests/integration/runtime_uring.rs`) onto controlled time too; it landed on the wall clock in #5244 rather than waiting for this quest. diff --git a/quest/m2/uring-connection-log.md b/quest/m2/uring-connection-log.md index 775ff2106cf..8fdf63601f1 100644 --- a/quest/m2/uring-connection-log.md +++ b/quest/m2/uring-connection-log.md @@ -41,7 +41,7 @@ Recommendations: harness filters: - An io_uring session shows its `conn` span and its close, like `relay_websocket_logs_its_close_under_a_cluster_id` in - `rs/moq-relay/tests/smoke.rs`. It belongs in `tests/runtime_uring.rs`, + `rs/moq-relay/tests/integration/smoke.rs`. It belongs in `tests/integration/runtime_uring.rs`, which skips loudly below the kernel floor. - A panic inside the lifecycle owner, forced on the ring's shared-runtime supervision, still logs that connection's close. This is diff --git a/quest/m2/uring-ietf.md b/quest/m2/uring-ietf.md index a42d8a58618..da02102b919 100644 --- a/quest/m2/uring-ietf.md +++ b/quest/m2/uring-ietf.md @@ -22,7 +22,7 @@ gap is in the worker's accept path, not in moq-net. - Serve the SETUP-negotiated lite versions the same way, or record why they stay refused; the operator-facing rule must be "the ring serves what the config lists". -- `tests/runtime_uring.rs` gains an IETF session and a SETUP-negotiated +- `tests/integration/runtime_uring.rs` gains an IETF session and a SETUP-negotiated session; both skip loudly below the kernel floor like the rest. - `doc/bin/relay/config.md` and the `moq-uring` README drop the lite-only caveat. diff --git a/quest/m3/hidden-exemption.md b/quest/m3/hidden-exemption.md index 1b1560fe6b9..f5edfae95ef 100644 --- a/quest/m3/hidden-exemption.md +++ b/quest/m3/hidden-exemption.md @@ -17,7 +17,7 @@ the mesh runs lite-07. hidden routes only when it asks, and the forced `with_hidden(true)` on the outbound dial in the same file. `connection::authorize` no longer exists on `main`; only `release` still has that shape. -- Replace `rs/moq-relay/tests/hidden_cluster.rs` with a lite-07 mesh test that +- Replace `rs/moq-relay/tests/integration/hidden_cluster.rs` with a lite-07 mesh test that still sees a `.`-prefixed hidden broadcast. ## Required diff --git a/quest/m3/uring-tcp/relay.md b/quest/m3/uring-tcp/relay.md index 4f05109b6f0..f8640db2856 100644 --- a/quest/m3/uring-tcp/relay.md +++ b/quest/m3/uring-tcp/relay.md @@ -23,7 +23,7 @@ transport is driven, which is what makes that handoff free here too. Keep the ops and web listeners' behavior identical: the same routes, the same CORS scoping, the same landing-page fallback, and the same -`/certificate.sha256` fingerprint. Extend `rs/moq-relay/tests/runtime_uring.rs` +`/certificate.sha256` fingerprint. Extend `rs/moq-relay/tests/integration/runtime_uring.rs` to prove a WebSocket session and an HTTP route both work when served from a worker. diff --git a/rs/justfile b/rs/justfile index 8f1bdf33cc5..7a964854d3f 100644 --- a/rs/justfile +++ b/rs/justfile @@ -269,12 +269,14 @@ gpu: sh/rs/gpu.sh # The media tasks run against a recorder rather than a device (see -# `rs/moq-cli/src/play/fake.rs`), so this needs no speaker or display. +# `rs/moq-cli/src/play/fake.rs`), so this needs no speaker or display. Only the +# binary's own tests: the integration tests spawn verbs `play` leaves alone, +# and the default pass already runs them. # Test moq-cli's `play` feature, which default features leave out. [positional-arguments] play *args: - just rs test -p moq-cli --features play "$@" + CARGO_BUILD_WARNINGS=deny RUSTC_WORKSPACE_WRAPPER={{ quote(require("clippy-driver")) }} bash sh/rs/nextest.sh cargo nextest run --locked -p moq-cli --features play --bins "$@" # Compile and run the `/// ```` examples, which nextest skips. [positional-arguments] diff --git a/rs/moq-net/benches/auth.rs b/rs/moq-net/benches/auth.rs index 044c88254ac..811a472a9c6 100644 --- a/rs/moq-net/benches/auth.rs +++ b/rs/moq-net/benches/auth.rs @@ -3,7 +3,7 @@ //! Measures the pending queue and complete grant/withdrawal lifecycle. Run the same //! matrix before and after queue changes so a per-session scan appears on its own axis. -#[path = "../tests/support/mod.rs"] +#[path = "../tests/integration/support/mod.rs"] mod support; use bytes::Bytes; diff --git a/rs/moq-net/benches/origin.rs b/rs/moq-net/benches/origin.rs index 53792fcbc0d..b674e1e5e10 100644 --- a/rs/moq-net/benches/origin.rs +++ b/rs/moq-net/benches/origin.rs @@ -24,7 +24,7 @@ //! //! Run with `cargo bench -p moq-net --bench origin`. -#[path = "../tests/support/mod.rs"] +#[path = "../tests/integration/support/mod.rs"] mod support; use std::task::Poll; diff --git a/rs/moq-net/benches/session.rs b/rs/moq-net/benches/session.rs index 58ed45c2aeb..07d5393f1f4 100644 --- a/rs/moq-net/benches/session.rs +++ b/rs/moq-net/benches/session.rs @@ -37,7 +37,7 @@ //! //! Run with `cargo bench -p moq-net --bench session`. -#[path = "../tests/support/mod.rs"] +#[path = "../tests/integration/support/mod.rs"] mod support; use std::alloc::{GlobalAlloc, Layout, System}; diff --git a/rs/moq-net/tests/announce_covering_route.rs b/rs/moq-net/tests/integration/announce_covering_route.rs similarity index 99% rename from rs/moq-net/tests/announce_covering_route.rs rename to rs/moq-net/tests/integration/announce_covering_route.rs index faa8bf1104c..5111b84d51c 100644 --- a/rs/moq-net/tests/announce_covering_route.rs +++ b/rs/moq-net/tests/integration/announce_covering_route.rs @@ -7,7 +7,7 @@ //! `.dash/nobody` sees it at its own root. Across a session the publisher must //! translate it into the requested scope rather than end the session. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/announce_to_serve.rs b/rs/moq-net/tests/integration/announce_to_serve.rs similarity index 99% rename from rs/moq-net/tests/announce_to_serve.rs rename to rs/moq-net/tests/integration/announce_to_serve.rs index ac28e54e59f..e0f6f17a6e5 100644 --- a/rs/moq-net/tests/announce_to_serve.rs +++ b/rs/moq-net/tests/integration/announce_to_serve.rs @@ -10,7 +10,7 @@ //! Deterministic: time is paused and the runtime is single-threaded, so settling //! is a virtual sleep. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/auth.rs b/rs/moq-net/tests/integration/auth.rs similarity index 99% rename from rs/moq-net/tests/auth.rs rename to rs/moq-net/tests/integration/auth.rs index ee2f9e96a9b..06ff9be41e5 100644 --- a/rs/moq-net/tests/auth.rs +++ b/rs/moq-net/tests/integration/auth.rs @@ -4,7 +4,7 @@ //! tokens union, and a publication outside the grant fails loud. Every case runs on //! moq-lite-07-wip and on moq-transport with the MoQ Auth extension. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/broadcast_close.rs b/rs/moq-net/tests/integration/broadcast_close.rs similarity index 99% rename from rs/moq-net/tests/broadcast_close.rs rename to rs/moq-net/tests/integration/broadcast_close.rs index cb8a0317530..a86dffa57aa 100644 --- a/rs/moq-net/tests/broadcast_close.rs +++ b/rs/moq-net/tests/integration/broadcast_close.rs @@ -5,7 +5,7 @@ //! [`Error::Unroutable`](moq_net::Error::Unroutable), a fresh request for the path //! answers the same, and the broadcast can never be announced again. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/catalog_acquisition.rs b/rs/moq-net/tests/integration/catalog_acquisition.rs similarity index 99% rename from rs/moq-net/tests/catalog_acquisition.rs rename to rs/moq-net/tests/integration/catalog_acquisition.rs index 8a9dfabc10a..99f09afce50 100644 --- a/rs/moq-net/tests/catalog_acquisition.rs +++ b/rs/moq-net/tests/integration/catalog_acquisition.rs @@ -2,7 +2,7 @@ //! Initial catalog acquisition while the same publisher gains a second session. -mod support; +use crate::support; use moq_net::{Error, Hop, Version, origin}; use support::harness::{MockConnectOptions, MockPair, connect_mock}; diff --git a/rs/moq-net/tests/datagram.rs b/rs/moq-net/tests/integration/datagram.rs similarity index 99% rename from rs/moq-net/tests/datagram.rs rename to rs/moq-net/tests/integration/datagram.rs index c3e10c1e10f..c85a2a975d4 100644 --- a/rs/moq-net/tests/datagram.rs +++ b/rs/moq-net/tests/integration/datagram.rs @@ -7,7 +7,7 @@ //! delivery through the model. The mock delivers queued datagrams //! deterministically, so every wait here is on an observable event. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/dial_split_horizon.rs b/rs/moq-net/tests/integration/dial_split_horizon.rs similarity index 99% rename from rs/moq-net/tests/dial_split_horizon.rs rename to rs/moq-net/tests/integration/dial_split_horizon.rs index 93715edbe57..29bab6b6f69 100644 --- a/rs/moq-net/tests/dial_split_horizon.rs +++ b/rs/moq-net/tests/integration/dial_split_horizon.rs @@ -8,7 +8,7 @@ //! anonymous dial: the accepting side already stamps one, and the dialing side //! has to as well. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/drained_claim.rs b/rs/moq-net/tests/integration/drained_claim.rs similarity index 99% rename from rs/moq-net/tests/drained_claim.rs rename to rs/moq-net/tests/integration/drained_claim.rs index fac272a2f84..42dbde8103f 100644 --- a/rs/moq-net/tests/drained_claim.rs +++ b/rs/moq-net/tests/integration/drained_claim.rs @@ -9,7 +9,7 @@ //! once unread lets the next viewer reach worker `B`, which wins the path now, rather //! than the drained worker. -mod support; +use crate::support; use std::{cell::RefCell, rc::Rc, time::Duration}; diff --git a/rs/moq-net/tests/empty_group.rs b/rs/moq-net/tests/integration/empty_group.rs similarity index 99% rename from rs/moq-net/tests/empty_group.rs rename to rs/moq-net/tests/integration/empty_group.rs index cda9fa705df..2a34604b15b 100644 --- a/rs/moq-net/tests/empty_group.rs +++ b/rs/moq-net/tests/integration/empty_group.rs @@ -4,7 +4,7 @@ //! to 17 its stream is a bare header with no FIRST_OBJECT bit, which must not read as a //! group missing its head. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/extensions.rs b/rs/moq-net/tests/integration/extensions.rs similarity index 99% rename from rs/moq-net/tests/extensions.rs rename to rs/moq-net/tests/integration/extensions.rs index 2245bda4ae6..373dcca4702 100644 --- a/rs/moq-net/tests/extensions.rs +++ b/rs/moq-net/tests/integration/extensions.rs @@ -5,7 +5,7 @@ //! //! Deterministic: paused time over the mock transport. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/fetch_cancel.rs b/rs/moq-net/tests/integration/fetch_cancel.rs similarity index 99% rename from rs/moq-net/tests/fetch_cancel.rs rename to rs/moq-net/tests/integration/fetch_cancel.rs index 9713dd94498..4763700353b 100644 --- a/rs/moq-net/tests/fetch_cancel.rs +++ b/rs/moq-net/tests/integration/fetch_cancel.rs @@ -7,7 +7,7 @@ //! (lite has no FETCH_OK, so one that never answers would pin them for good) or is //! partway through the group. A group cut short is aborted, never cached as whole. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/fetch_caps.rs b/rs/moq-net/tests/integration/fetch_caps.rs similarity index 99% rename from rs/moq-net/tests/fetch_caps.rs rename to rs/moq-net/tests/integration/fetch_caps.rs index 0fe832bcf3b..1848c8cd22d 100644 --- a/rs/moq-net/tests/fetch_caps.rs +++ b/rs/moq-net/tests/integration/fetch_caps.rs @@ -2,7 +2,7 @@ //! FETCH caps are charged per peer before shared group requests coalesce. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/fetch_from_feed.rs b/rs/moq-net/tests/integration/fetch_from_feed.rs similarity index 99% rename from rs/moq-net/tests/fetch_from_feed.rs rename to rs/moq-net/tests/integration/fetch_from_feed.rs index 46605da88df..71b045ad86b 100644 --- a/rs/moq-net/tests/fetch_from_feed.rs +++ b/rs/moq-net/tests/integration/fetch_from_feed.rs @@ -4,7 +4,7 @@ //! subscription: a group the feed delivers is served, and one it never will is a miss, //! never a version error that a caller would retry forever. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/fetch_only.rs b/rs/moq-net/tests/integration/fetch_only.rs similarity index 99% rename from rs/moq-net/tests/fetch_only.rs rename to rs/moq-net/tests/integration/fetch_only.rs index 44aea98130a..b07827c7283 100644 --- a/rs/moq-net/tests/fetch_only.rs +++ b/rs/moq-net/tests/integration/fetch_only.rs @@ -6,7 +6,7 @@ //! fetchable, and a relay's fetch-only demand puts no live subscription upstream to race //! the fetches that report where the track ends. -mod support; +use crate::support; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/rs/moq-net/tests/finished_broadcast_mock.rs b/rs/moq-net/tests/integration/finished_broadcast_mock.rs similarity index 99% rename from rs/moq-net/tests/finished_broadcast_mock.rs rename to rs/moq-net/tests/integration/finished_broadcast_mock.rs index 6f45072b9a5..c5ef5a9901b 100644 --- a/rs/moq-net/tests/finished_broadcast_mock.rs +++ b/rs/moq-net/tests/integration/finished_broadcast_mock.rs @@ -14,7 +14,7 @@ //! writes the track and ends it with no await in between, so the session has sent //! nothing when the broadcast ends. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/finite_relay.rs b/rs/moq-net/tests/integration/finite_relay.rs similarity index 99% rename from rs/moq-net/tests/finite_relay.rs rename to rs/moq-net/tests/integration/finite_relay.rs index 1eb555e7176..50198691be1 100644 --- a/rs/moq-net/tests/finite_relay.rs +++ b/rs/moq-net/tests/integration/finite_relay.rs @@ -8,7 +8,7 @@ //! last until those groups drain: a relay cancels its upstream subscription once nobody //! subscribes, and the publisher then resets every group still on the wire. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/goaway.rs b/rs/moq-net/tests/integration/goaway.rs similarity index 99% rename from rs/moq-net/tests/goaway.rs rename to rs/moq-net/tests/integration/goaway.rs index 018f1bfa270..87c8ece0ba2 100644 --- a/rs/moq-net/tests/goaway.rs +++ b/rs/moq-net/tests/integration/goaway.rs @@ -6,7 +6,7 @@ //! network I/O), so these tests are reliable without sleeps: every wait is on //! an observable event. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/group_charge.rs b/rs/moq-net/tests/integration/group_charge.rs similarity index 100% rename from rs/moq-net/tests/group_charge.rs rename to rs/moq-net/tests/integration/group_charge.rs diff --git a/rs/moq-net/tests/group_order.rs b/rs/moq-net/tests/integration/group_order.rs similarity index 99% rename from rs/moq-net/tests/group_order.rs rename to rs/moq-net/tests/integration/group_order.rs index 0baba6f72fd..5c948e1c54d 100644 --- a/rs/moq-net/tests/group_order.rs +++ b/rs/moq-net/tests/integration/group_order.rs @@ -7,7 +7,7 @@ //! the hop into the subscriber and releases them by send order, the way a congested //! sender would transmit them. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/head_fetch.rs b/rs/moq-net/tests/integration/head_fetch.rs similarity index 99% rename from rs/moq-net/tests/head_fetch.rs rename to rs/moq-net/tests/integration/head_fetch.rs index 6a44bb04038..3cdc55a17ac 100644 --- a/rs/moq-net/tests/head_fetch.rs +++ b/rs/moq-net/tests/integration/head_fetch.rs @@ -8,7 +8,7 @@ //! then fetches the head through the relay, whose cache must not trade the live group //! for the fetched copy. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/history_groups.rs b/rs/moq-net/tests/integration/history_groups.rs similarity index 99% rename from rs/moq-net/tests/history_groups.rs rename to rs/moq-net/tests/integration/history_groups.rs index 9bedb5efa54..fdd85302b8d 100644 --- a/rs/moq-net/tests/history_groups.rs +++ b/rs/moq-net/tests/integration/history_groups.rs @@ -8,7 +8,7 @@ //! would drop the older group for good. The mock holds the publisher's group streams and //! releases them newest first to make that race deterministic. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/idle_cancel_refetch.rs b/rs/moq-net/tests/integration/idle_cancel_refetch.rs similarity index 99% rename from rs/moq-net/tests/idle_cancel_refetch.rs rename to rs/moq-net/tests/integration/idle_cancel_refetch.rs index f0f17b0ec84..7b251ab7590 100644 --- a/rs/moq-net/tests/idle_cancel_refetch.rs +++ b/rs/moq-net/tests/integration/idle_cancel_refetch.rs @@ -3,7 +3,7 @@ //! A relay whose last reader leaves mid-group cancels the idle upstream subscription. A later //! fetch of that group still gets every frame (#5348, a release-line regression). -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/idle_session.rs b/rs/moq-net/tests/integration/idle_session.rs similarity index 99% rename from rs/moq-net/tests/idle_session.rs rename to rs/moq-net/tests/integration/idle_session.rs index c8f98eca9b9..0422a34f5f3 100644 --- a/rs/moq-net/tests/idle_session.rs +++ b/rs/moq-net/tests/integration/idle_session.rs @@ -4,7 +4,7 @@ //! no transport stats reads while nothing moves. A server holds thousands of these, //! so a fixed-interval timer per session adds up to whole cores. -mod support; +use crate::support; use std::{ sync::{ diff --git a/rs/moq-net/tests/late_lower_group.rs b/rs/moq-net/tests/integration/late_lower_group.rs similarity index 99% rename from rs/moq-net/tests/late_lower_group.rs rename to rs/moq-net/tests/integration/late_lower_group.rs index 98cb74e523a..60b539e7c0e 100644 --- a/rs/moq-net/tests/late_lower_group.rs +++ b/rs/moq-net/tests/integration/late_lower_group.rs @@ -7,7 +7,7 @@ //! is dropped. Lite-06 and later encode a floor of group 0 as 0, which is the only //! spelling of both an omitted floor and group 0; the draft says that 0 is group 0. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/integration/main.rs b/rs/moq-net/tests/integration/main.rs new file mode 100644 index 00000000000..297d5be5656 --- /dev/null +++ b/rs/moq-net/tests/integration/main.rs @@ -0,0 +1,55 @@ +//! Every integration test, linked into one binary. +//! +//! Each `tests/*.rs` file is its own crate that links this package and its +//! dependencies again, so add new integration tests here as a module. +//! `loom.rs` and `wasm.rs` stay apart because they build for another cfg or +//! target. + +mod announce_covering_route; +mod announce_to_serve; +mod auth; +mod broadcast_close; +mod catalog_acquisition; +mod datagram; +mod dial_split_horizon; +mod drained_claim; +mod empty_group; +mod extensions; +mod fetch_cancel; +mod fetch_caps; +mod fetch_from_feed; +mod fetch_only; +mod finished_broadcast_mock; +mod finite_relay; +mod goaway; +mod group_charge; +mod group_order; +mod head_fetch; +mod history_groups; +mod idle_cancel_refetch; +mod idle_session; +mod late_lower_group; +mod mesh_withdraw; +mod model; +mod multi_cdn; +mod quiet_catalog; +mod rejoin; +mod replacement; +mod request_caps; +mod restart; +mod route_change; +mod routing_contracts; +mod session_close; +mod session_panic; +mod settled_end_survives_abort; +mod subscribe_tracks; +mod subscription_end_integrity; +mod support; +mod track_abort_over_session; +mod track_info_cancel; +mod track_stream_demand; +mod track_tail; +mod unannounce_release; +mod untimed; +mod wide_sequence; +mod zero_copy; diff --git a/rs/moq-net/tests/mesh_withdraw.rs b/rs/moq-net/tests/integration/mesh_withdraw.rs similarity index 99% rename from rs/moq-net/tests/mesh_withdraw.rs rename to rs/moq-net/tests/integration/mesh_withdraw.rs index 78ba885591f..1d5006ea589 100644 --- a/rs/moq-net/tests/mesh_withdraw.rs +++ b/rs/moq-net/tests/integration/mesh_withdraw.rs @@ -7,7 +7,7 @@ //! withdrawn; a relay that selects them in turn re-advertises each stale path, and //! the cluster walks all of them before it converges (path hunting). -mod support; +use crate::support; use std::{collections::HashMap, time::Duration}; diff --git a/rs/moq-net/tests/model.rs b/rs/moq-net/tests/integration/model.rs similarity index 100% rename from rs/moq-net/tests/model.rs rename to rs/moq-net/tests/integration/model.rs diff --git a/rs/moq-net/tests/multi_cdn.rs b/rs/moq-net/tests/integration/multi_cdn.rs similarity index 99% rename from rs/moq-net/tests/multi_cdn.rs rename to rs/moq-net/tests/integration/multi_cdn.rs index bda5fb8390c..27e3888171e 100644 --- a/rs/moq-net/tests/multi_cdn.rs +++ b/rs/moq-net/tests/integration/multi_cdn.rs @@ -9,7 +9,7 @@ //! back. Between lite-07 routes with the same epoch each move resumes the subscription. //! A moq-transport `B` carries no epoch, so each move is a restart and a re-request. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/quiet_catalog.rs b/rs/moq-net/tests/integration/quiet_catalog.rs similarity index 99% rename from rs/moq-net/tests/quiet_catalog.rs rename to rs/moq-net/tests/integration/quiet_catalog.rs index f8f95ed7c98..1c0496f34b1 100644 --- a/rs/moq-net/tests/quiet_catalog.rs +++ b/rs/moq-net/tests/integration/quiet_catalog.rs @@ -5,7 +5,7 @@ //! catalog does not produce one, so a reader that never received the snapshot //! must still get it. -mod support; +use crate::support; use std::{future::Future, time::Duration}; diff --git a/rs/moq-net/tests/rejoin.rs b/rs/moq-net/tests/integration/rejoin.rs similarity index 99% rename from rs/moq-net/tests/rejoin.rs rename to rs/moq-net/tests/integration/rejoin.rs index 5e644ad9cac..f94aeec4279 100644 --- a/rs/moq-net/tests/rejoin.rs +++ b/rs/moq-net/tests/integration/rejoin.rs @@ -2,7 +2,7 @@ //! A reader leaving and rejoining a track relayed over the in-memory mock transport. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/replacement.rs b/rs/moq-net/tests/integration/replacement.rs similarity index 99% rename from rs/moq-net/tests/replacement.rs rename to rs/moq-net/tests/integration/replacement.rs index 5ac121d0e04..d55bc73097d 100644 --- a/rs/moq-net/tests/replacement.rs +++ b/rs/moq-net/tests/integration/replacement.rs @@ -10,7 +10,7 @@ //! of failing `Unroutable`. With an epoch the replacement continues the instance: no //! `Restart`, and the old handle keeps working. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/request_caps.rs b/rs/moq-net/tests/integration/request_caps.rs similarity index 99% rename from rs/moq-net/tests/request_caps.rs rename to rs/moq-net/tests/integration/request_caps.rs index 37af0d31e42..16e400cc69e 100644 --- a/rs/moq-net/tests/request_caps.rs +++ b/rs/moq-net/tests/integration/request_caps.rs @@ -5,7 +5,7 @@ //! the MAX_REQUEST_ID window they size is granted back as requests close, so a client that //! keeps opening and closing requests within the caps never stalls. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/restart.rs b/rs/moq-net/tests/integration/restart.rs similarity index 99% rename from rs/moq-net/tests/restart.rs rename to rs/moq-net/tests/integration/restart.rs index 1d9d43538aa..786adc05358 100644 --- a/rs/moq-net/tests/restart.rs +++ b/rs/moq-net/tests/integration/restart.rs @@ -8,7 +8,7 @@ //! retires its copy of the old source, so a new subscriber never sees the old //! instance's cached groups. -mod support; +use crate::support; use std::{cell::RefCell, rc::Rc, time::Duration}; diff --git a/rs/moq-net/tests/route_change.rs b/rs/moq-net/tests/integration/route_change.rs similarity index 99% rename from rs/moq-net/tests/route_change.rs rename to rs/moq-net/tests/integration/route_change.rs index f299e0c9e0a..5c2a6f64f41 100644 --- a/rs/moq-net/tests/route_change.rs +++ b/rs/moq-net/tests/integration/route_change.rs @@ -15,7 +15,7 @@ //! Two publishers sharing one explicit epoch, a redundant pair, are one source the //! same way. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/routing_contracts/main.rs b/rs/moq-net/tests/integration/routing_contracts/mod.rs similarity index 100% rename from rs/moq-net/tests/routing_contracts/main.rs rename to rs/moq-net/tests/integration/routing_contracts/mod.rs diff --git a/rs/moq-net/tests/routing_contracts/model.rs b/rs/moq-net/tests/integration/routing_contracts/model.rs similarity index 100% rename from rs/moq-net/tests/routing_contracts/model.rs rename to rs/moq-net/tests/integration/routing_contracts/model.rs diff --git a/rs/moq-net/tests/session_close.rs b/rs/moq-net/tests/integration/session_close.rs similarity index 99% rename from rs/moq-net/tests/session_close.rs rename to rs/moq-net/tests/integration/session_close.rs index 92f2c79cf73..2b343e0e075 100644 --- a/rs/moq-net/tests/session_close.rs +++ b/rs/moq-net/tests/integration/session_close.rs @@ -5,7 +5,7 @@ //! //! Deterministic: simulated time over the mock transport. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/session_panic.rs b/rs/moq-net/tests/integration/session_panic.rs similarity index 99% rename from rs/moq-net/tests/session_panic.rs rename to rs/moq-net/tests/integration/session_panic.rs index 8ff80b487bf..e23f6542bc4 100644 --- a/rs/moq-net/tests/session_panic.rs +++ b/rs/moq-net/tests/integration/session_panic.rs @@ -9,7 +9,7 @@ //! //! Deterministic: simulated time over the mock transport. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/settled_end_survives_abort.rs b/rs/moq-net/tests/integration/settled_end_survives_abort.rs similarity index 99% rename from rs/moq-net/tests/settled_end_survives_abort.rs rename to rs/moq-net/tests/integration/settled_end_survives_abort.rs index 91e376ecc7c..3ab60142576 100644 --- a/rs/moq-net/tests/settled_end_survives_abort.rs +++ b/rs/moq-net/tests/integration/settled_end_survives_abort.rs @@ -5,7 +5,7 @@ //! the session dying, ends the track cleanly but must not throw those groups away: a //! consumer that has not read them yet still gets them, then the clean end. -mod support; +use crate::support; use moq_net::{Error, Hop, Timestamp}; diff --git a/rs/moq-net/tests/subscribe_tracks.rs b/rs/moq-net/tests/integration/subscribe_tracks.rs similarity index 99% rename from rs/moq-net/tests/subscribe_tracks.rs rename to rs/moq-net/tests/integration/subscribe_tracks.rs index 892faba5b9b..1d447558d23 100644 --- a/rs/moq-net/tests/subscribe_tracks.rs +++ b/rs/moq-net/tests/integration/subscribe_tracks.rs @@ -4,7 +4,7 @@ //! //! Deterministic: paused time and a single-threaded runtime over the mock transport. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/subscription_end_integrity.rs b/rs/moq-net/tests/integration/subscription_end_integrity.rs similarity index 99% rename from rs/moq-net/tests/subscription_end_integrity.rs rename to rs/moq-net/tests/integration/subscription_end_integrity.rs index 26ba2a08acc..a1b8d1f6f83 100644 --- a/rs/moq-net/tests/subscription_end_integrity.rs +++ b/rs/moq-net/tests/integration/subscription_end_integrity.rs @@ -19,7 +19,7 @@ //! Deterministic: paused time, single-threaded runtime, and every "let the session //! send" step is an idle-advance rather than a race. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/support/harness.rs b/rs/moq-net/tests/integration/support/harness.rs similarity index 100% rename from rs/moq-net/tests/support/harness.rs rename to rs/moq-net/tests/integration/support/harness.rs diff --git a/rs/moq-net/tests/support/mock.rs b/rs/moq-net/tests/integration/support/mock.rs similarity index 100% rename from rs/moq-net/tests/support/mock.rs rename to rs/moq-net/tests/integration/support/mock.rs diff --git a/rs/moq-net/tests/support/mod.rs b/rs/moq-net/tests/integration/support/mod.rs similarity index 75% rename from rs/moq-net/tests/support/mod.rs rename to rs/moq-net/tests/integration/support/mod.rs index 44c6b336839..21d53a8dbb0 100644 --- a/rs/moq-net/tests/support/mod.rs +++ b/rs/moq-net/tests/integration/support/mod.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "async")] + //! Shared test support for moq-net integration tests. pub mod harness; diff --git a/rs/moq-net/tests/track_abort_over_session.rs b/rs/moq-net/tests/integration/track_abort_over_session.rs similarity index 99% rename from rs/moq-net/tests/track_abort_over_session.rs rename to rs/moq-net/tests/integration/track_abort_over_session.rs index 78092394ce1..0255c231525 100644 --- a/rs/moq-net/tests/track_abort_over_session.rs +++ b/rs/moq-net/tests/integration/track_abort_over_session.rs @@ -3,7 +3,7 @@ //! A track aborted by its publisher while the broadcast stays announced, read by a //! subscriber on the far side of one session. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/track_info_cancel.rs b/rs/moq-net/tests/integration/track_info_cancel.rs similarity index 99% rename from rs/moq-net/tests/track_info_cancel.rs rename to rs/moq-net/tests/integration/track_info_cancel.rs index 087caff7898..0f8359b6dad 100644 --- a/rs/moq-net/tests/track_info_cancel.rs +++ b/rs/moq-net/tests/integration/track_info_cancel.rs @@ -8,7 +8,7 @@ //! with its stream credit spent) pins them for good, and a relay retrying across //! routes accumulates them until it runs out of memory. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/track_stream_demand.rs b/rs/moq-net/tests/integration/track_stream_demand.rs similarity index 99% rename from rs/moq-net/tests/track_stream_demand.rs rename to rs/moq-net/tests/integration/track_stream_demand.rs index aa05ee3ce03..c0e0226f73b 100644 --- a/rs/moq-net/tests/track_stream_demand.rs +++ b/rs/moq-net/tests/integration/track_stream_demand.rs @@ -8,7 +8,7 @@ //! publisher watching its demand sees one `used` edge for a viewer, not `used`, `unused`, //! `used` with a round trip per hop in between. -mod support; +use crate::support; use std::{cell::RefCell, rc::Rc, time::Duration}; diff --git a/rs/moq-net/tests/track_tail.rs b/rs/moq-net/tests/integration/track_tail.rs similarity index 99% rename from rs/moq-net/tests/track_tail.rs rename to rs/moq-net/tests/integration/track_tail.rs index 5aa94eb55dd..3cce8c6dcf6 100644 --- a/rs/moq-net/tests/track_tail.rs +++ b/rs/moq-net/tests/integration/track_tail.rs @@ -11,7 +11,7 @@ //! //! Time is paused, so the one-second grace for a group that never arrives is free. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/unannounce_release.rs b/rs/moq-net/tests/integration/unannounce_release.rs similarity index 98% rename from rs/moq-net/tests/unannounce_release.rs rename to rs/moq-net/tests/integration/unannounce_release.rs index 4bb181f9a16..17df6141387 100644 --- a/rs/moq-net/tests/unannounce_release.rs +++ b/rs/moq-net/tests/integration/unannounce_release.rs @@ -3,7 +3,7 @@ //! A relay reading a broadcast that its publisher unannounced still cancels its upstream //! subscription once its last reader leaves, so the publisher's demand goes unused. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/untimed.rs b/rs/moq-net/tests/integration/untimed.rs similarity index 99% rename from rs/moq-net/tests/untimed.rs rename to rs/moq-net/tests/integration/untimed.rs index 883ca9a332c..bda1d5a78e3 100644 --- a/rs/moq-net/tests/untimed.rs +++ b/rs/moq-net/tests/integration/untimed.rs @@ -7,7 +7,7 @@ //! encoder writes its send time instead, and those hops are the one place an untimed track //! gains a timeline. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/wide_sequence.rs b/rs/moq-net/tests/integration/wide_sequence.rs similarity index 99% rename from rs/moq-net/tests/wide_sequence.rs rename to rs/moq-net/tests/integration/wide_sequence.rs index 11f6763bb5e..ffa82869a14 100644 --- a/rs/moq-net/tests/wide_sequence.rs +++ b/rs/moq-net/tests/integration/wide_sequence.rs @@ -2,7 +2,7 @@ //! A group sequence only moq-lite 07 can carry, relayed to a moq-lite 06 reader. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-net/tests/zero_copy.rs b/rs/moq-net/tests/integration/zero_copy.rs similarity index 99% rename from rs/moq-net/tests/zero_copy.rs rename to rs/moq-net/tests/integration/zero_copy.rs index 74539b0372d..99ebbd9d903 100644 --- a/rs/moq-net/tests/zero_copy.rs +++ b/rs/moq-net/tests/integration/zero_copy.rs @@ -4,7 +4,7 @@ //! publisher hands the payload to the transport, and the subscriber reads it back, //! without a copy on either side. -mod support; +use crate::support; use std::time::Duration; diff --git a/rs/moq-relay/tests/auth_embedder.rs b/rs/moq-relay/tests/integration/auth_embedder.rs similarity index 100% rename from rs/moq-relay/tests/auth_embedder.rs rename to rs/moq-relay/tests/integration/auth_embedder.rs diff --git a/rs/moq-relay/tests/auth_lifetime.rs b/rs/moq-relay/tests/integration/auth_lifetime.rs similarity index 100% rename from rs/moq-relay/tests/auth_lifetime.rs rename to rs/moq-relay/tests/integration/auth_lifetime.rs diff --git a/rs/moq-relay/tests/cluster_idle.rs b/rs/moq-relay/tests/integration/cluster_idle.rs similarity index 100% rename from rs/moq-relay/tests/cluster_idle.rs rename to rs/moq-relay/tests/integration/cluster_idle.rs diff --git a/rs/moq-relay/tests/cluster_unknown.rs b/rs/moq-relay/tests/integration/cluster_unknown.rs similarity index 100% rename from rs/moq-relay/tests/cluster_unknown.rs rename to rs/moq-relay/tests/integration/cluster_unknown.rs diff --git a/rs/moq-relay/tests/embed.rs b/rs/moq-relay/tests/integration/embed.rs similarity index 100% rename from rs/moq-relay/tests/embed.rs rename to rs/moq-relay/tests/integration/embed.rs diff --git a/rs/moq-relay/tests/goaway_cluster.rs b/rs/moq-relay/tests/integration/goaway_cluster.rs similarity index 100% rename from rs/moq-relay/tests/goaway_cluster.rs rename to rs/moq-relay/tests/integration/goaway_cluster.rs diff --git a/rs/moq-relay/tests/hidden_cluster.rs b/rs/moq-relay/tests/integration/hidden_cluster.rs similarity index 100% rename from rs/moq-relay/tests/hidden_cluster.rs rename to rs/moq-relay/tests/integration/hidden_cluster.rs diff --git a/rs/moq-relay/tests/lan_mesh.rs b/rs/moq-relay/tests/integration/lan_mesh.rs similarity index 100% rename from rs/moq-relay/tests/lan_mesh.rs rename to rs/moq-relay/tests/integration/lan_mesh.rs diff --git a/rs/moq-relay/tests/integration/main.rs b/rs/moq-relay/tests/integration/main.rs new file mode 100644 index 00000000000..4a183b72a20 --- /dev/null +++ b/rs/moq-relay/tests/integration/main.rs @@ -0,0 +1,24 @@ +//! Every integration test, linked into one binary. +//! +//! Each `tests/*.rs` file is its own crate that links this package and its +//! dependencies again, so add new integration tests here as a module. +//! `drills.rs` stays apart so each drill sensitivity mutation rebuilds only +//! the drills. + +mod auth_embedder; +mod auth_lifetime; +mod cluster_idle; +mod cluster_unknown; +mod embed; +mod goaway_cluster; +mod hidden_cluster; +mod lan_mesh; +mod public_rules; +mod refusals; +mod released_cli; +mod runtime_uring; +mod runtime_workers; +mod session_revalidate; +mod shutdown_signal; +mod smoke; +mod upstream_links; diff --git a/rs/moq-relay/tests/public_rules.rs b/rs/moq-relay/tests/integration/public_rules.rs similarity index 100% rename from rs/moq-relay/tests/public_rules.rs rename to rs/moq-relay/tests/integration/public_rules.rs diff --git a/rs/moq-relay/tests/refusals.rs b/rs/moq-relay/tests/integration/refusals.rs similarity index 100% rename from rs/moq-relay/tests/refusals.rs rename to rs/moq-relay/tests/integration/refusals.rs diff --git a/rs/moq-relay/tests/released_cli.rs b/rs/moq-relay/tests/integration/released_cli.rs similarity index 100% rename from rs/moq-relay/tests/released_cli.rs rename to rs/moq-relay/tests/integration/released_cli.rs diff --git a/rs/moq-relay/tests/runtime_uring.rs b/rs/moq-relay/tests/integration/runtime_uring.rs similarity index 100% rename from rs/moq-relay/tests/runtime_uring.rs rename to rs/moq-relay/tests/integration/runtime_uring.rs diff --git a/rs/moq-relay/tests/runtime_workers.rs b/rs/moq-relay/tests/integration/runtime_workers.rs similarity index 100% rename from rs/moq-relay/tests/runtime_workers.rs rename to rs/moq-relay/tests/integration/runtime_workers.rs diff --git a/rs/moq-relay/tests/session_revalidate.rs b/rs/moq-relay/tests/integration/session_revalidate.rs similarity index 100% rename from rs/moq-relay/tests/session_revalidate.rs rename to rs/moq-relay/tests/integration/session_revalidate.rs diff --git a/rs/moq-relay/tests/shutdown_signal.rs b/rs/moq-relay/tests/integration/shutdown_signal.rs similarity index 100% rename from rs/moq-relay/tests/shutdown_signal.rs rename to rs/moq-relay/tests/integration/shutdown_signal.rs diff --git a/rs/moq-relay/tests/smoke.rs b/rs/moq-relay/tests/integration/smoke.rs similarity index 100% rename from rs/moq-relay/tests/smoke.rs rename to rs/moq-relay/tests/integration/smoke.rs diff --git a/rs/moq-relay/tests/upstream_links.rs b/rs/moq-relay/tests/integration/upstream_links.rs similarity index 100% rename from rs/moq-relay/tests/upstream_links.rs rename to rs/moq-relay/tests/integration/upstream_links.rs diff --git a/rs/moq-tokio/tests/alpn.rs b/rs/moq-tokio/tests/integration/alpn.rs similarity index 100% rename from rs/moq-tokio/tests/alpn.rs rename to rs/moq-tokio/tests/integration/alpn.rs diff --git a/rs/moq-tokio/tests/backend.rs b/rs/moq-tokio/tests/integration/backend.rs similarity index 100% rename from rs/moq-tokio/tests/backend.rs rename to rs/moq-tokio/tests/integration/backend.rs diff --git a/rs/moq-tokio/tests/broadcast.rs b/rs/moq-tokio/tests/integration/broadcast.rs similarity index 99% rename from rs/moq-tokio/tests/broadcast.rs rename to rs/moq-tokio/tests/integration/broadcast.rs index bf01de50450..8f6ccf71c86 100644 --- a/rs/moq-tokio/tests/broadcast.rs +++ b/rs/moq-tokio/tests/integration/broadcast.rs @@ -3586,7 +3586,7 @@ async fn goaway_timeout_force_close_moq_transport_19_quic() { // *reason* is best-effort on real QUIC (the client driver's own teardown // close can race the server's CONNECTION_CLOSE and stomp it), so the // structured reason is asserted in the deterministic mock test - // (rs/moq-net/tests/goaway.rs) instead. + // (rs/moq-net/tests/integration/goaway.rs) instead. let reason = tokio::time::timeout(Duration::from_secs(3), connection.closed()) .await .expect("force-close was not enforced within the deadline"); diff --git a/rs/moq-tokio/tests/close_code.rs b/rs/moq-tokio/tests/integration/close_code.rs similarity index 100% rename from rs/moq-tokio/tests/close_code.rs rename to rs/moq-tokio/tests/integration/close_code.rs diff --git a/rs/moq-tokio/tests/integration/main.rs b/rs/moq-tokio/tests/integration/main.rs new file mode 100644 index 00000000000..79552d9449e --- /dev/null +++ b/rs/moq-tokio/tests/integration/main.rs @@ -0,0 +1,15 @@ +//! Every integration test, linked into one binary. +//! +//! Each `tests/*.rs` file is its own crate that links this package and its +//! dependencies again, so add new integration tests here as a module. + +mod alpn; +mod backend; +mod broadcast; +mod close_code; +mod max_age; +mod reconnect; +mod stream_code; +mod subscription_end_integrity; +mod unannounce; +mod worker; diff --git a/rs/moq-tokio/tests/max_age.rs b/rs/moq-tokio/tests/integration/max_age.rs similarity index 100% rename from rs/moq-tokio/tests/max_age.rs rename to rs/moq-tokio/tests/integration/max_age.rs diff --git a/rs/moq-tokio/tests/reconnect.rs b/rs/moq-tokio/tests/integration/reconnect.rs similarity index 100% rename from rs/moq-tokio/tests/reconnect.rs rename to rs/moq-tokio/tests/integration/reconnect.rs diff --git a/rs/moq-tokio/tests/stream_code.rs b/rs/moq-tokio/tests/integration/stream_code.rs similarity index 100% rename from rs/moq-tokio/tests/stream_code.rs rename to rs/moq-tokio/tests/integration/stream_code.rs diff --git a/rs/moq-tokio/tests/subscription_end_integrity.rs b/rs/moq-tokio/tests/integration/subscription_end_integrity.rs similarity index 100% rename from rs/moq-tokio/tests/subscription_end_integrity.rs rename to rs/moq-tokio/tests/integration/subscription_end_integrity.rs diff --git a/rs/moq-tokio/tests/unannounce.rs b/rs/moq-tokio/tests/integration/unannounce.rs similarity index 100% rename from rs/moq-tokio/tests/unannounce.rs rename to rs/moq-tokio/tests/integration/unannounce.rs diff --git a/rs/moq-tokio/tests/worker.rs b/rs/moq-tokio/tests/integration/worker.rs similarity index 100% rename from rs/moq-tokio/tests/worker.rs rename to rs/moq-tokio/tests/integration/worker.rs diff --git a/rs/moq-uring/benches/echo_noq.rs b/rs/moq-uring/benches/echo_noq.rs index e9c0866f1c3..13590b65193 100644 --- a/rs/moq-uring/benches/echo_noq.rs +++ b/rs/moq-uring/benches/echo_noq.rs @@ -3,7 +3,7 @@ use criterion::{criterion_group, criterion_main}; #[cfg(target_os = "linux")] -#[path = "../tests/support.rs"] +#[path = "../tests/integration/support.rs"] mod support; #[cfg(target_os = "linux")] diff --git a/rs/moq-uring/benches/session_lite.rs b/rs/moq-uring/benches/session_lite.rs index cc629a98b6b..b3e98fc8157 100644 --- a/rs/moq-uring/benches/session_lite.rs +++ b/rs/moq-uring/benches/session_lite.rs @@ -10,7 +10,7 @@ use criterion::{criterion_group, criterion_main}; #[cfg(all(target_os = "linux", feature = "noq"))] -#[path = "../tests/support.rs"] +#[path = "../tests/integration/support.rs"] mod support; #[cfg(all(target_os = "linux", feature = "noq"))] diff --git a/rs/moq-uring/tests/echo.rs b/rs/moq-uring/tests/integration/echo.rs similarity index 99% rename from rs/moq-uring/tests/echo.rs rename to rs/moq-uring/tests/integration/echo.rs index f50825b136a..0c55998903c 100644 --- a/rs/moq-uring/tests/echo.rs +++ b/rs/moq-uring/tests/integration/echo.rs @@ -2,8 +2,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; diff --git a/rs/moq-uring/tests/ecn.rs b/rs/moq-uring/tests/integration/ecn.rs similarity index 100% rename from rs/moq-uring/tests/ecn.rs rename to rs/moq-uring/tests/integration/ecn.rs diff --git a/rs/moq-uring/tests/endpoint.rs b/rs/moq-uring/tests/integration/endpoint.rs similarity index 99% rename from rs/moq-uring/tests/endpoint.rs rename to rs/moq-uring/tests/integration/endpoint.rs index 899bb2cd9bd..b4f6ddcb221 100644 --- a/rs/moq-uring/tests/endpoint.rs +++ b/rs/moq-uring/tests/integration/endpoint.rs @@ -6,8 +6,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; use std::sync::{Arc, Mutex}; diff --git a/rs/moq-uring/tests/identity.rs b/rs/moq-uring/tests/integration/identity.rs similarity index 99% rename from rs/moq-uring/tests/identity.rs rename to rs/moq-uring/tests/integration/identity.rs index 4a1673e2bcc..d420b8919e7 100644 --- a/rs/moq-uring/tests/identity.rs +++ b/rs/moq-uring/tests/integration/identity.rs @@ -6,8 +6,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; use std::task::{Context, Poll, Waker}; diff --git a/rs/moq-uring/tests/integration/main.rs b/rs/moq-uring/tests/integration/main.rs new file mode 100644 index 00000000000..f9315633cad --- /dev/null +++ b/rs/moq-uring/tests/integration/main.rs @@ -0,0 +1,18 @@ +//! Every integration test, linked into one binary. +//! +//! Each `tests/*.rs` file is its own crate that links this package and its +//! dependencies again, so add new integration tests here as a module. +//! `allocations.rs` stays apart because its counting global allocator would +//! apply to every test in the binary. + +mod echo; +mod ecn; +mod endpoint; +mod identity; +mod qlog; +mod session; +mod support; +mod teardown; +mod transport; +mod web; +mod workers; diff --git a/rs/moq-uring/tests/qlog.rs b/rs/moq-uring/tests/integration/qlog.rs similarity index 99% rename from rs/moq-uring/tests/qlog.rs rename to rs/moq-uring/tests/integration/qlog.rs index 9a1ff28ef6b..6e5ec7eb298 100644 --- a/rs/moq-uring/tests/qlog.rs +++ b/rs/moq-uring/tests/integration/qlog.rs @@ -11,8 +11,7 @@ #![cfg(all(target_os = "linux", feature = "qlog", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; diff --git a/rs/moq-uring/tests/session.rs b/rs/moq-uring/tests/integration/session.rs similarity index 99% rename from rs/moq-uring/tests/session.rs rename to rs/moq-uring/tests/integration/session.rs index 22fef4fb5d2..26a954e1c22 100644 --- a/rs/moq-uring/tests/session.rs +++ b/rs/moq-uring/tests/integration/session.rs @@ -10,8 +10,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; diff --git a/rs/moq-uring/tests/support.rs b/rs/moq-uring/tests/integration/support.rs similarity index 100% rename from rs/moq-uring/tests/support.rs rename to rs/moq-uring/tests/integration/support.rs diff --git a/rs/moq-uring/tests/teardown.rs b/rs/moq-uring/tests/integration/teardown.rs similarity index 99% rename from rs/moq-uring/tests/teardown.rs rename to rs/moq-uring/tests/integration/teardown.rs index ad1383a5e9c..3adc7e532aa 100644 --- a/rs/moq-uring/tests/teardown.rs +++ b/rs/moq-uring/tests/integration/teardown.rs @@ -12,8 +12,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; use std::time::Duration; diff --git a/rs/moq-uring/tests/transport.rs b/rs/moq-uring/tests/integration/transport.rs similarity index 67% rename from rs/moq-uring/tests/transport.rs rename to rs/moq-uring/tests/integration/transport.rs index 84fe4df6e5a..eb3353e6f25 100644 --- a/rs/moq-uring/tests/transport.rs +++ b/rs/moq-uring/tests/integration/transport.rs @@ -1,3 +1,3 @@ // Exercise the transport adapter on native hosts without a browser or ring. -#[path = "../src/transport/adapter.rs"] +#[path = "../../src/transport/adapter.rs"] mod adapter; diff --git a/rs/moq-uring/tests/web.rs b/rs/moq-uring/tests/integration/web.rs similarity index 99% rename from rs/moq-uring/tests/web.rs rename to rs/moq-uring/tests/integration/web.rs index 0cfef78d1c2..8c2ab744326 100644 --- a/rs/moq-uring/tests/web.rs +++ b/rs/moq-uring/tests/integration/web.rs @@ -7,8 +7,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; diff --git a/rs/moq-uring/tests/workers.rs b/rs/moq-uring/tests/integration/workers.rs similarity index 99% rename from rs/moq-uring/tests/workers.rs rename to rs/moq-uring/tests/integration/workers.rs index d832d4c0a49..0ff11c8f154 100644 --- a/rs/moq-uring/tests/workers.rs +++ b/rs/moq-uring/tests/integration/workers.rs @@ -11,8 +11,7 @@ #![cfg(all(target_os = "linux", feature = "noq"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; diff --git a/test/justfile b/test/justfile index 9dc104843b0..b3b81b75813 100644 --- a/test/justfile +++ b/test/justfile @@ -183,7 +183,7 @@ video: # Optional publisher retention across Rust/JS sessions through a Rust relay. max-age: - cargo nextest run --locked -p moq-tokio --test max_age --run-ignored all + cargo nextest run --locked -p moq-tokio --test integration -E 'test(/^max_age::/)' --run-ignored all # Cross-language subscription termination over in-memory transports. bare-fin: diff --git a/test/ts/README.md b/test/ts/README.md index 3ae16c10b81..5e4fa646154 100644 --- a/test/ts/README.md +++ b/test/ts/README.md @@ -623,7 +623,7 @@ The round-trip rig explicitly negotiates `moq-lite-07-wip` on the relay, publisher and subscribers. Its publisher epochs allow acquisition to continue when a session is replaced. Production defaults remain unchanged: Lite-06 cannot prove publisher identity across session replacement and must refuse a -pending acquisition. `rs/moq-net/tests/catalog_acquisition.rs` covers both +pending acquisition. `rs/moq-net/tests/integration/catalog_acquisition.rs` covers both outcomes deterministically in Rust CI, without retries or implicit `--stitch`. [`.github/workflows/ts.yml`](../../.github/workflows/ts.yml) is independent of From 0a5c8b7582c51d59b70c24a148caa5f7338eef5d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 16 Oct 2026 12:09:44 -0700 Subject: [PATCH 3/6] test: fold the uring credit test into its integration binary Co-Authored-By: Claude Opus 5.5 --- rs/moq-net/tests/integration/main.rs | 4 ++-- rs/moq-uring/tests/{ => integration}/credit.rs | 3 +-- rs/moq-uring/tests/integration/main.rs | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) rename rs/moq-uring/tests/{ => integration}/credit.rs (99%) diff --git a/rs/moq-net/tests/integration/main.rs b/rs/moq-net/tests/integration/main.rs index 297d5be5656..a9d5d567c81 100644 --- a/rs/moq-net/tests/integration/main.rs +++ b/rs/moq-net/tests/integration/main.rs @@ -2,8 +2,8 @@ //! //! Each `tests/*.rs` file is its own crate that links this package and its //! dependencies again, so add new integration tests here as a module. -//! `loom.rs` and `wasm.rs` stay apart because they build for another cfg or -//! target. +//! `loom.rs`, `wasm.rs`, and `send.rs` stay apart because they build for +//! another cfg, target, or toolchain. mod announce_covering_route; mod announce_to_serve; diff --git a/rs/moq-uring/tests/credit.rs b/rs/moq-uring/tests/integration/credit.rs similarity index 99% rename from rs/moq-uring/tests/credit.rs rename to rs/moq-uring/tests/integration/credit.rs index 6a9fcf3787b..b6d91de0e71 100644 --- a/rs/moq-uring/tests/credit.rs +++ b/rs/moq-uring/tests/integration/credit.rs @@ -6,8 +6,7 @@ #![cfg(all(target_os = "linux", feature = "quic"))] -#[path = "support.rs"] -mod support; +use crate::support; use std::net::UdpSocket; use std::task::Poll; diff --git a/rs/moq-uring/tests/integration/main.rs b/rs/moq-uring/tests/integration/main.rs index f9315633cad..ae4d797d51d 100644 --- a/rs/moq-uring/tests/integration/main.rs +++ b/rs/moq-uring/tests/integration/main.rs @@ -5,6 +5,7 @@ //! `allocations.rs` stays apart because its counting global allocator would //! apply to every test in the binary. +mod credit; mod echo; mod ecn; mod endpoint; From 8f35e07da4e5502db62f1d4bccef4dc98d0b6085 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 16 Oct 2026 14:01:07 -0700 Subject: [PATCH 4/6] ci: run drill sensitivity only in nightly Nightly already runs every mutation. The PR job stays advisory while the drills' sockets run on the host clock, so it spent runner time without gating anything. Drop it with its selector and point rs/AGENTS.md at the `tests/integration/` module. Co-Authored-By: Claude Opus 5.5 --- .github/justfile | 1 - .github/workflows/check.yml | 43 -------------------------- rs/AGENTS.md | 2 +- test/drill/README.md | 13 ++------ test/drill/pr.py | 54 --------------------------------- test/drill/pr.test.py | 60 ------------------------------------- test/justfile | 5 ---- 7 files changed, 3 insertions(+), 175 deletions(-) delete mode 100644 test/drill/pr.py delete mode 100644 test/drill/pr.test.py diff --git a/.github/justfile b/.github/justfile index 209acb7000e..979945d743f 100644 --- a/.github/justfile +++ b/.github/justfile @@ -17,7 +17,6 @@ test: python3 bench/profile.test.py python3 bench/ffi.test.py python3 sh/gh/gst-formula.test.py - python3 test/drill/pr.test.py python3 sh/changed.test.py python3 sh/dispatch-query.test.py python3 sh/dispatch-query.test.py --bench diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fb524aa7ad7..98fce3d41ea 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -144,46 +144,3 @@ jobs: CI_BASE: ${{ github.event.merge_group.base_sha }} MOQ_STRICT: 1 NEXTEST_PROFILE: ci - - drill-sensitivity: - name: Drill sensitivity - if: github.event.action != 'closed' - runs-on: ubuntu-24.04-arm - timeout-minutes: 60 - # Socket timing is still uncontrolled. Keep this advisory until the drills - # use the controlled clock, then remove this and require the stable job name. - continue-on-error: true - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - fetch-depth: 0 - - - uses: ./.github/actions/just - - - name: Select mutations - id: scope - run: just test drill-pr select "$CI_BASE" >> "$GITHUB_OUTPUT" - env: - CI_BASE: ${{ github.event.merge_group.base_sha }} - - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - if: steps.scope.outputs.needed == 'true' - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - - - name: Rust cache - if: steps.scope.outputs.needed == 'true' - uses: ./.github/actions/rust-cache - - - name: Prove sensitivity - if: steps.scope.outputs.needed == 'true' - run: nix develop --command just test drill-pr run "$CI_BASE" - env: - CI_BASE: ${{ github.event.merge_group.base_sha }} - MOQ_SHAPER_SEED: "1" - NEXTEST_PROFILE: ci diff --git a/rs/AGENTS.md b/rs/AGENTS.md index 52ff1bc226f..e38f7042351 100644 --- a/rs/AGENTS.md +++ b/rs/AGENTS.md @@ -50,7 +50,7 @@ Prefer poll. New logic is a `poll_*` with an `async` helper, not the other way a # Testing -- Tests are inline `#[cfg(test)] mod tests`, except full Client/Server session tests over a crate's shared mock harness, which go in its `tests/` directory. Time-dependent async tests call `tokio::time::pause()` first (moq-net uses `#[moq_net_sim::test]` instead), unless they cross real networking that can't be mocked (sockets, smoke tests); those run on the wall clock and assert lower bounds. +- Tests are inline `#[cfg(test)] mod tests`, except full Client/Server session tests over a crate's shared mock harness, which go in its `tests/integration/` module. Time-dependent async tests call `tokio::time::pause()` first (moq-net uses `#[moq_net_sim::test]` instead), unless they cross real networking that can't be mocked (sockets, smoke tests); those run on the wall clock and assert lower bounds. - Run tests through `just` (nextest), not `cargo test`: nextest kills a wedged test as TIMEOUT, cargo hangs forever. A test flagged SLOW is a bug to fix, not a threshold to raise. - `just check` compiles default features only, like CI. `just rs features` (nightly) covers `--all-features` / `--no-default-features`. Keep a feature gate around the dependency, not the logic, so the logic's tests stay in the merge gate. - Local checks compile only the host platform; PR CI runs `just rs windows` / `macos` on those hosts, and `just rs wasm` covers `moq-wasm`. diff --git a/test/drill/README.md b/test/drill/README.md index 824abb52ef1..41e83ba43d7 100644 --- a/test/drill/README.md +++ b/test/drill/README.md @@ -158,17 +158,8 @@ that stop detecting their recovery failures fail CI. `just check` also runs `--apply-only` whenever Rust or this directory changes, so a patch that no longer applies fails the PR that moved its code rather than the next nightly. -The Check workflow's advisory `Drill sensitivity` job also runs on pull requests -and merge groups. It selects mutations whose `+++ b/` target paths or patch files -changed. Changing the drill tests, sensitivity harness, or selector runs them all. -An unrelated change still reports a successful job without installing Nix or -building snapshots. PR scope uses the PR base; merge-group scope uses its base SHA. - -The job pins `MOQ_SHAPER_SEED=1`, but sockets still run on the host clock, so -load can change the outcome. Its job-level `continue-on-error` keeps the workflow -advisory. Once the drills use controlled time, remove that flag and ask the -maintainer to require `Drill sensitivity`; no repository setting changes here. -The full nightly run remains independent of PR selection. +Pull requests do not run the mutations: the drills' sockets still run on the host +clock, so load can change the outcome. `sensitivity.sh` removes one recovery behavior at a time and requires the drill covering it to fail. Each mutation is a patch under `mutations/`, applied to a diff --git a/test/drill/pr.py b/test/drill/pr.py deleted file mode 100644 index f09a4fdf87a..00000000000 --- a/test/drill/pr.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python3 -"""Select PR-sensitive drill mutations and run the existing sensitivity harness.""" - -import argparse -from pathlib import Path -import re -import subprocess - -ROOT = Path(__file__).resolve().parents[2] - - -def select(changed: set[str], mutations: Path) -> list[str]: - patches = sorted(mutations.glob("*.patch")) - if not patches: - raise ValueError("no drill mutations found") - all_mutations = bool(changed & { - "rs/moq-relay/tests/drills.rs", - "test/drill/sensitivity.sh", - "test/drill/pr.py", - }) - selected = [] - for patch in patches: - if not re.fullmatch(r"[a-z0-9-]+", patch.stem): - raise ValueError(f"invalid mutation name: {patch.name}") - paths = set(re.findall(r"^\+\+\+ b/(.+)$", patch.read_text(), re.MULTILINE)) - if not paths: - raise ValueError(f"mutation names no target files: {patch.name}") - if all_mutations or f"test/drill/mutations/{patch.name}" in changed or changed & paths: - selected.append(patch.stem) - return selected - - -def main() -> int: - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("mode", choices=["select", "run"]) - parser.add_argument("base", nargs="?", default="") - args = parser.parse_args() - changed = subprocess.check_output( - ["bash", str(ROOT / "sh/changed.sh"), args.base], cwd=ROOT, text=True, - ).splitlines() - mutations = select(set(changed), ROOT / "test/drill/mutations") - if args.mode == "select": - # Always report, including an empty diff, so this can later be a required job. - print(f"needed={str(bool(mutations)).lower()}") - return 0 - if not mutations: - print("No affected drill mutations.") - return 0 - print("Selected drill mutations: " + ", ".join(mutations), flush=True) - return subprocess.call(["bash", str(ROOT / "test/drill/sensitivity.sh"), *mutations], cwd=ROOT) - - -if __name__ == "__main__": - raise SystemExit(main()) diff --git a/test/drill/pr.test.py b/test/drill/pr.test.py deleted file mode 100644 index 945d7626d47..00000000000 --- a/test/drill/pr.test.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python3 -"""Scope regressions for the advisory PR mutation job.""" - -import importlib.util -from pathlib import Path -import subprocess -import tempfile -import unittest - -spec = importlib.util.spec_from_file_location("drill_pr", Path(__file__).with_name("pr.py")) -drill = importlib.util.module_from_spec(spec) -spec.loader.exec_module(drill) - - -class Scope(unittest.TestCase): - def setUp(self): - self.temp = tempfile.TemporaryDirectory() - self.addCleanup(self.temp.cleanup) - self.mutations = Path(self.temp.name) - (self.mutations / "first.patch").write_text("+++ b/rs/first.rs\n+++ b/rs/shared.rs\n") - (self.mutations / "second.patch").write_text("+++ b/rs/second.rs\n+++ b/rs/shared.rs\n") - - def selected(self, *changed): - return drill.select(set(changed), self.mutations) - - def test_recipe_reports_a_result_for_an_explicit_base(self): - result = subprocess.run( - ["just", "test", "drill-pr", "select", "HEAD"], cwd=drill.ROOT, - text=True, capture_output=True, - ) - self.assertEqual(result.returncode, 0, result.stderr) - self.assertRegex(result.stdout, r"^needed=(true|false)\n$") - - def test_empty_and_unrelated_changes_select_nothing(self): - self.assertEqual(self.selected(), []) - self.assertEqual(self.selected("README.md", ".github/workflows/check.yml"), []) - - def test_target_paths_and_patch_changes_select_only_affected_mutations(self): - self.assertEqual(self.selected("rs/first.rs"), ["first"]) - self.assertEqual(self.selected("test/drill/mutations/second.patch"), ["second"]) - self.assertEqual(self.selected("rs/shared.rs"), ["first", "second"]) - self.assertEqual(self.selected("rs/first.rs", "rs/shared.rs"), ["first", "second"]) - - def test_drill_or_harness_changes_select_every_mutation(self): - for path in ["rs/moq-relay/tests/drills.rs", "test/drill/sensitivity.sh", "test/drill/pr.py"]: - with self.subTest(path=path): - self.assertEqual(self.selected(path), ["first", "second"]) - - def test_malformed_mutations_fail_instead_of_silently_selecting_nothing(self): - (self.mutations / "broken.patch").write_text("not a patch\n") - with self.assertRaisesRegex(ValueError, "no target files"): - self.selected("README.md") - - def test_deleted_mutations_are_not_passed_to_the_harness(self): - (self.mutations / "second.patch").unlink() - self.assertEqual(self.selected("test/drill/mutations/second.patch"), []) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/justfile b/test/justfile index b48f8bb5667..07f610765b3 100644 --- a/test/justfile +++ b/test/justfile @@ -117,11 +117,6 @@ audio-quality-record *args: drill-sensitivity *args: ./drill/sensitivity.sh "$@" -# Select or run the PR's affected sensitivity mutations against its base. -[positional-arguments] -drill-pr mode base="": - python3 ./drill/pr.py "$@" - # Round-trips a PCR-paced TS through a relay and checks the subscriber's `export # ts` output with FFmpeg, TSDuck and a custom analyzer (the T-STD buffer model, PCR # spacing and byte schedule). Flags: `--analyze-only file.ts` From a6e1fb72b2ca38ede2bcd664464cd61a34b4a107 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 16 Oct 2026 14:10:12 -0700 Subject: [PATCH 5/6] test: keep group_charge's counting allocator in its own binary Its #[global_allocator] would otherwise count every allocation in every moq-net integration test. Co-Authored-By: Claude Opus 5.5 --- rs/moq-net/tests/{integration => }/group_charge.rs | 0 rs/moq-net/tests/integration/main.rs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename rs/moq-net/tests/{integration => }/group_charge.rs (100%) diff --git a/rs/moq-net/tests/integration/group_charge.rs b/rs/moq-net/tests/group_charge.rs similarity index 100% rename from rs/moq-net/tests/integration/group_charge.rs rename to rs/moq-net/tests/group_charge.rs diff --git a/rs/moq-net/tests/integration/main.rs b/rs/moq-net/tests/integration/main.rs index a9d5d567c81..d155bb218f5 100644 --- a/rs/moq-net/tests/integration/main.rs +++ b/rs/moq-net/tests/integration/main.rs @@ -3,7 +3,8 @@ //! Each `tests/*.rs` file is its own crate that links this package and its //! dependencies again, so add new integration tests here as a module. //! `loom.rs`, `wasm.rs`, and `send.rs` stay apart because they build for -//! another cfg, target, or toolchain. +//! another cfg, target, or toolchain. `group_charge.rs` stays apart because its +//! counting global allocator would apply to every test in the binary. mod announce_covering_route; mod announce_to_serve; @@ -22,7 +23,6 @@ mod fetch_only; mod finished_broadcast_mock; mod finite_relay; mod goaway; -mod group_charge; mod group_order; mod head_fetch; mod history_groups; From 41ce0f0b3bc2a97084f5f28638fde8f2599eb60d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 16 Oct 2026 14:14:57 -0700 Subject: [PATCH 6/6] docs: point the remaining test references at tests/integration Co-Authored-By: Claude Opus 5.5 --- quest/m1/claim-answer-epochs.md | 2 +- quest/m1/public-model/ingest.md | 2 +- rs/moq-tokio/src/client.rs | 2 +- rs/moq-uring/README.md | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/quest/m1/claim-answer-epochs.md b/quest/m1/claim-answer-epochs.md index 6997edad0ba..59ad093c5a8 100644 --- a/quest/m1/claim-answer-epochs.md +++ b/quest/m1/claim-answer-epochs.md @@ -85,7 +85,7 @@ and behind an edge relay of ours, on lite-05, 06, 07 and moq-transport 14, 16, 22: the returning reader gets the new output from group 0, never the old group, and sibling paths keep their readers. On the wires without an epoch that rests on our relays retiring a copy on End then Start, as -`tests/restart.rs` shows; arbitrary older caching relays are out of scope, as +`tests/integration/restart.rs` shows; arbitrary older caching relays are out of scope, as in [IETF epochs](/quest/m1/ietf-epochs.md), since base IETF object identity survives a withdrawal. A same-epoch lagging replica still resumes, checked on lite-07 only, the one wire here that carries the epoch. JS mirrors the tests. diff --git a/quest/m1/public-model/ingest.md b/quest/m1/public-model/ingest.md index 4484f5ce4f4..7c499ba14a5 100644 --- a/quest/m1/public-model/ingest.md +++ b/quest/m1/public-model/ingest.md @@ -43,7 +43,7 @@ Rust items (`rs/moq-net/src/model/`), as they stood at b4eab0db1: reports the last frame that exists. This touches [Live largest location](/quest/m1/largest.md); align with it there. - Regression guard: `rejoin_waits_for_the_answers_first_frame` - (`rs/moq-net/tests/rejoin.rs`, fails when the judgments count a + (`rs/moq-net/tests/integration/rejoin.rs`, fails when the judgments count a frameless group) and `revealing_a_presented_group_wakes_a_read_it_expires` stay; `a_withheld_group_holds_the_end` and diff --git a/rs/moq-tokio/src/client.rs b/rs/moq-tokio/src/client.rs index 43db32c05ca..347b2545816 100644 --- a/rs/moq-tokio/src/client.rs +++ b/rs/moq-tokio/src/client.rs @@ -1510,7 +1510,7 @@ mod tests { let quic_addr: crate::connect::Addr = Url::parse(&format!("https://localhost:{quic_port}")).unwrap().into(); let ws_addr: crate::connect::Addr = Url::parse(&format!("http://localhost:{ws_port}")).unwrap().into(); - // Keep this aligned with the newest default Lite version, as in tests/broadcast.rs. + // Keep this aligned with the newest default Lite version, as in tests/integration/broadcast.rs. let expected_version: moq_net::Version = "moq-lite-06".parse().expect("invalid version"); let server_handle = tokio::spawn(async move { diff --git a/rs/moq-uring/README.md b/rs/moq-uring/README.md index ec84787ea01..0529f27982b 100644 --- a/rs/moq-uring/README.md +++ b/rs/moq-uring/README.md @@ -92,14 +92,14 @@ endpoint on the accept side and per dial on the connect side. ## Validation -`tests/echo.rs` runs an echo against a tokio QUIC peer over the worker: +`tests/integration/echo.rs` runs an echo against a tokio QUIC peer over the worker: handshake, half a megabyte each way, and timers driven by moq-quic's timeout. -`tests/session.rs` runs full moq-lite sessions through +`tests/integration/session.rs` runs full moq-lite sessions through `quic::Endpoint` (including two clients demuxed on one server socket), and -`tests/endpoint.rs` covers the endpoint mechanics (dial+accept on one socket, -version negotiation, the dial-only refusal), `tests/workers.rs` runs a +`tests/integration/endpoint.rs` covers the endpoint mechanics (dial+accept on one socket, +version negotiation, the dial-only refusal), `tests/integration/workers.rs` runs a steered two-worker reuseport group serving one port across threads, and -`tests/web.rs` is WebTransport interop against moq-tokio's: stream and +`tests/integration/web.rs` is WebTransport interop against moq-tokio's: stream and datagram echo through the H3 framing, close codes through the capsule, and a full moq-lite session over WebTransport. All of them skip (loudly) below the kernel floor, which