Skip to content
Open
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
9 changes: 8 additions & 1 deletion crates/gitlawb-node/src/reconciliation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6440,6 +6440,13 @@ mod tests {
/// Write one canned HTTP response on an accepted fake-S3 socket.
/// A free function (not a closure) so the `&mut` socket borrow does
/// not leak into a returned future's lifetime.
///
/// The fake serves one request per accepted socket and drops it, so each
/// response says `Connection: close`. Without it the client keeps the
/// socket in its pool after the server has closed it, and the next request
/// can reuse a dead connection. The client has retries disabled, as in
/// production, so `sweep_restores_tigris_cache_miss_and_skips_missing`
/// failed with "repo acquire failed" on a loaded runner.
async fn s3_respond(
sock: &mut tokio::net::TcpStream,
status: &str,
Expand All @@ -6448,7 +6455,7 @@ mod tests {
) {
use tokio::io::AsyncWriteExt;
let head = format!(
"HTTP/1.1 {status}\r\nContent-Length: {}\r\n{extra}\r\n",
"HTTP/1.1 {status}\r\nContent-Length: {}\r\nConnection: close\r\n{extra}\r\n",
payload.len()
);
let _ = sock.write_all(head.as_bytes()).await;
Expand Down
Loading