Skip to content
Merged
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
11 changes: 11 additions & 0 deletions crates/socket-patch-core/src/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5606,6 +5606,17 @@ mod vendor_retry_tests {
"{error:?}"
);
assert!(retryable, "body timeout keeps the retry hint");
// The client can give up on an attempt before this
// single-threaded runtime polls the server task that reads and
// counts its request (a starved runner fires the 100 ms timer
// first). The request bytes are already in the socket buffer,
// so wait for the server to count both attempts.
let deadline = std::time::Instant::now() + Duration::from_secs(10);
while requests.load(Ordering::Relaxed) - before < 2
&& std::time::Instant::now() < deadline
{
tokio::time::sleep(Duration::from_millis(10)).await;
}
assert_eq!(requests.load(Ordering::Relaxed) - before, 2);
}
}
Expand Down
Loading