Skip to content

tests: additional stream affinity tests - #890

Merged
flub merged 4 commits into
mainfrom
ramfox/stream-affinity-tests
Nov 11, 2026
Merged

flub merged 4 commits into
mainfrom
ramfox/stream-affinity-tests

Conversation

@ramfox

@ramfox ramfox commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Add additional tests for stream affinity.

noq-proto test is a vanity test so I can have a hook into starting to understand stream affinity and packet building.

API Changes

Notes & open questions

Not finished, going to add additional tests for these cases:

  • general noq test showing affinities are respected
  • test showing stream affinity changes happen if you change from block -> any

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • cargo make passes locally.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/890/docs/noq/

Last updated: 2026-11-09T22:38:49Z

@n0bot n0bot Bot added this to iroh Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Nov 4, 2026
@ramfox
ramfox force-pushed the ramfox/stream-affinity-tests branch from 1a00540 to 431c2c6 Compare November 6, 2026 05:03
@ramfox
ramfox requested a review from flub November 6, 2026 05:05
@ramfox
ramfox force-pushed the ramfox/stream-affinity-tests branch from 034e16b to 76a189f Compare November 6, 2026 05:10
@ramfox
ramfox marked this pull request as ready for review November 6, 2026 05:10
@flub
flub changed the base branch from main to flub/stream-affinity-simple November 6, 2026 10:29

@flub flub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the tests are good in principle

Comment thread noq-proto/src/tests/multipath.rs Resolved
Comment thread noq/src/tests.rs Resolved
Comment thread noq/src/tests.rs Resolved
Comment thread noq/src/tests.rs

let server_conn = server_conn_rx.await.unwrap();

// Open a second path, retrying until remote CIDs are available

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭 i want a better api for this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but i will say having to understand wtf this did in the other tests made me learn some stuff 😂

Kind of reminds me of the API i think we should add in iroh::Connection, where we want to wait for some specific things to happen w/ the topology of the available paths before we proceed with sending.

Comment thread noq/src/tests.rs Resolved
Comment thread noq/src/tests.rs Resolved
@ramfox
ramfox requested a review from flub November 9, 2026 21:44
Base automatically changed from flub/stream-affinity-simple to main November 9, 2026 21:50
…ins_stream_to_path`

`stream_affinity_wakes_connection_driver` ensures that when we go from `StreamAffinity::Block` to any other affinity, any blocked data is queued immediately.

`stream_affinity_pins_stream_to_path` is a sanity check
@ramfox
ramfox force-pushed the ramfox/stream-affinity-tests branch from 217dfe7 to 4f5e82f Compare November 9, 2026 22:37
@flub
flub added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 5773596 Nov 11, 2026
34 checks passed
@flub
flub deleted the ramfox/stream-affinity-tests branch November 11, 2026 10:19
@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to ✅ Done in iroh Nov 11, 2026
emrul added a commit to GetAster/noq that referenced this pull request Nov 24, 2026
* upstream/main: (24 commits)
  refactor(proto): call the std-only float math through crate-root helpers (n0-computer#848)
  refactor(proto): Avoid PathId allocation when building PATH_ACKS (n0-computer#901)
  chore: Release
  chore(deps): fix unused crates warnings of rust 1.100 (n0-computer#899)
  chore: Update issue template checkboxes (n0-computer#897)
  chore: humantime is unmaintained (n0-computer#900)
  chore(ci): fix workflows for test binaries locations (n0-computer#896)
  fix(perf): don't enable qlog feature in perf binary (n0-computer#850)
  fix(proto): track the key update boundary per path (n0-computer#869)
  tests: additional stream affinity tests (n0-computer#890)
  feat: allow streams to set an affinity for a path, simple version (n0-computer#881)
  fix(udp): handle receive errors before truncation flags in recv_single (n0-computer#884)
  chore: Upgrade async-executor and allow warnings in patchbay build (n0-computer#888)
  chore: Use shared minimal-crates worksflow (n0-computer#862)
  tests: Increase local slow-tests timeout (n0-computer#860)
  fix(proto): keep unread data when compacting an unordered stream (n0-computer#867)
  fix(proto): coalesce contiguous chunks during defragment (n0-computer#866)
  deps: Bump tokio for RUSTSEC-2026-0386 (n0-computer#868)
  feat(proto): Implement `noq_proto::SendStream::set_affinity` (n0-computer#836)
  fix(ci): bump deps for illumos (n0-computer#856)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants