Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion quest/m0/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,5 @@ Public API: none. Wire: none.
## Required

- [Fallback playback](/quest/m0/test-flakes-2/ietf22-fallback.md) - a browser viewer follows a fallback within the media lane's bound without dropping its session
- [moq-relay's forged-dial test waits for bob's endpoint](/quest/m0/test-flakes-2/forged-dial-announce.md) - `a_forged_dial_never_connects` requests bob's endpoint only after its announce reaches mallory, and its `#[ignore]` is removed
- [moq-uring's qlog accounting test waits on the accounting](/quest/m0/test-flakes-2/qlog-staging-spin.md) - `an_open_trace_accounts_for_staging_and_close` waits for the accounting, not 10,000 spins
- [js/net's widened max-age re-drop test ends cleanly, not with a reset](/quest/m0/test-flakes-2/widened-max-age-reset.md) - the test finishes the track only after the re-drop reply arrives, so the end is a FIN, and drops its wall-clock assert
31 changes: 0 additions & 31 deletions quest/m0/test-flakes-2/forged-dial-announce.md

This file was deleted.

26 changes: 23 additions & 3 deletions rs/moq-relay/tests/integration/socket_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,25 @@ async fn recv(reader: &mut moq_net::track::Ordered) -> Vec<u8> {
.expect("read timeout")
}

/// Wait until `id`, a hidden endpoint, is announced to `origin`, so a request for it
/// never syncs ahead of the announce and reports it unroutable.
async fn announced(origin: &moq_net::origin::Producer, id: &str) {
let mut announced = origin.consume().with_hidden(true).announced();
let wait = async {
while let Some(event) = announced.next().await {
if let moq_net::announce::Event::Present(announce) = event
&& announce.prefix.as_str() == id
{
return;
}
}
panic!("{id}: origin closed");
};
kio::clock::timeout(TIMEOUT, wait)
.await
.unwrap_or_else(|_| panic!("{id} was never announced"));
}

/// The prefix grants admit a dial and its accept in either protocol, and the session
/// carries data, over moq-lite-07 and across a moq-transport hop.
#[tokio::test]
Expand Down Expand Up @@ -232,7 +251,6 @@ async fn prefix_grants_admit_a_session() {
/// name. Bob sees a dial from alice, but alice never dialed it and resets his accept, so it
/// never connects and mallory reads nothing.
#[tokio::test]
#[ignore = "flaky: mallory's request can sync before bob's announce arrives; quest/m0/test-flakes-2/forged-dial-announce.md"]
async fn a_forged_dial_never_connects() {
let fixture = Fixture::new().await;
let (alice, _alice_origin, _alice_session) = fixture.endpoint(Role::Client, "alice", LITE).await;
Expand All @@ -243,6 +261,7 @@ async fn a_forged_dial_never_connects() {

// Bob's first accept announces his server endpoint.
assert!(bob.poll_accept_tcp(&kio::Waiter::noop()).is_pending());
announced(&mallory_origin, ".server/bob").await;

let forge = async {
let broadcast = mallory_origin
Expand Down Expand Up @@ -275,9 +294,10 @@ async fn a_client_grant_neither_serves_nor_reads_clients() {
let (_bob, bob_origin, _bob_session) = fixture.endpoint(Role::Server, "bob", LITE).await;
// Bob, a server, reads a client endpoint once the relay carries it.
let carried = |id: &'static str| {
let origin = bob_origin.consume();
let origin = bob_origin.clone();
async move {
kio::clock::timeout(TIMEOUT, origin.request(id, None))
announced(&origin, id).await;
kio::clock::timeout(TIMEOUT, origin.consume().request(id, None))
.await
.expect("request timeout")
.unwrap_or_else(|err| panic!("{id}: {err}"));
Expand Down
1 change: 0 additions & 1 deletion sh/gh/test-inventory.allow
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ ignore moq-video::render::export::dx12::tests::media_foundation_encodes_the_expo
# Quarantined flakes, re-enabled by the quest that fixes them.

# Flaky, disabled until its quest fixes the cause.
ignore moq-relay::socket_auth::a_forged_dial_never_connects /quest/m0/test-flakes-2/forged-dial-announce.md

# Need another implementation to speak the route wire; the quest ports it.
ignore moq-net::test_interop::lite_tracks_interop /quest/m2/cluster-routing/routes/js.md
Expand Down
Loading