quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Don't rely on sleeping in 0-RTT test #1522

Closed Ralith closed 1 year ago

Ralith commented 1 year ago

This is unnecessarily racy, at least in principle.

djc commented 1 year ago

Nice! @nmittler FYI.

Ralith commented 1 year ago

Tangentially: a common cause of tests getting stuck until a timeout and then passing (which came up in previous related discussion) is relying on the implicit close-on-drop behavior and failing to drop something before calling wait_idle. It can be avoided robustly by closing connections explicitly.

nmittler commented 1 year ago

@Ralith we should probably also add a test for 0-RTT being rejected here. That's where I'm running into a timing issue in the quinn-boring PR. There is a lower-level test for rejection under quinn-proto, but it doesn't suffer from the same timing problem.