Move `quic/tests/smoke::{read, write}_after_peer_dropped_stream` to muxer test harness
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Description
We currently have the two tests {read, write}_after_peer_dropped_stream on QUIC that test reading / writing to a stream after the remote peer already dropped the stream.
As @thomaseizinger proposed in https://github.com/libp2p/rust-libp2p/pull/3164#discussion_r1031805526 we should consider moving these tests to the new stream muxer test harness.
Moving the tests to the test harness would require some more design work.
Compared to the other tests in the harness these tests test a specific sequential order in which alice and bob do their calls, rather than the things running in parallel. Therefore we can not use the current test harness API and instead have to add a new abstraction for these kind of tests.
Motivation
The test hardness is a great framework for abstracting and maintaining tests that should be run on all libp2p muxers. The mentioned tests are nothing QUIC specific. Moving them to the test harness would:
- enable running them also on yamux and mplex
- ease future tests with similar setups, if we find a nice abstraction
Current Implementation
The tests currently only live in quic/tests/smoke: https://github.com/libp2p/rust-libp2p/blob/1c2712c1bc288dc608aaec5fc3458b0d07181feb/transports/quic/tests/smoke.rs#L273-L304
Are you planning to do it yourself in a pull request?
No.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with quic/tests/smoke.rs around lines 273-304 and inspect the existing stream muxer test harness API. Design an abstraction for tests requiring sequential calls between Alice and Bob, then move read_after_peer_dropped_stream and write_after_peer_dropped_stream into the harness. Done means the tests run through the harness for QUIC, yamux, and mplex.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100