Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions linkerd/http/retry/src/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ where
tracing::trace!("Cannot replay buffered body, maximum buffer length reached");
return Poll::Ready(Some(Err(Capped.into())));
}
this.replay_body = false;
}
if this.replay_trailers {
this.replay_trailers = false;
Expand Down
17 changes: 17 additions & 0 deletions linkerd/http/retry/src/replay/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ async fn replays_one_chunk() {
}
}

#[tokio::test]
async fn replays_unpolled_body() {
let Test {
mut tx,
initial,
replay,
_trace,
} = Test::new();
tx.send_data("hello world").await;
drop(tx);
drop(initial);

let (data, trailers) = body_to_string(replay).await;
assert_eq!(data, "hello world");
assert_eq!(trailers, None);
}

#[tokio::test]
async fn replays_several_chunks() {
let Test {
Expand Down