Skip to content

Commit ad5952f

Browse files
authored
nit(http/retry): remove extra body poll in tests (#3877)
the initial replay body, circa the usage of our "compatibility" layer (4b53081, #3598), used to need an extra poll to confirm the absence of trailers before it would report itself as reaching the end of the stream. these tests were added in (afda8a7, #3583). this was an artifact of how the compatibility middleware masked the previous `poll_data()` and `poll_trailer()` methods behind a forward-compatible `poll_frame()`- and `frame()`-oriented interface. this commit removes these extra calls to `initial.frame().await`, now that the initial body will report the end of stream without an extra call to await a `None`. X-ref: #3598 X-ref: #3583 Signed-off-by: katelyn martin <[email protected]>
1 parent d25bbf2 commit ad5952f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

linkerd/http/retry/src/replay/tests.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,6 @@ async fn eos_only_when_fully_replayed() {
340340
.expect("yields a frame")
341341
.into_data()
342342
.expect("yields a data frame");
343-
// TODO(kate): the initial body doesn't report ending until it has (not) yielded trailers.
344-
assert!(initial.frame().await.is_none());
345343
assert!(initial.is_end_stream());
346344
assert!(!replay.is_end_stream());
347345
drop(initial);
@@ -611,8 +609,6 @@ async fn size_hint_is_correct_across_replays() {
611609

612610
// Read the body, check the size hint again.
613611
assert_eq!(chunk(&mut initial).await.as_deref(), Some(BODY));
614-
// TODO(kate): the initial body doesn't report ending until it has (not) yielded trailers.
615-
assert!(initial.frame().await.is_none());
616612
debug_assert!(initial.is_end_stream());
617613
// TODO(kate): this currently misreports the *remaining* size of the body.
618614
// let size = initial.size_hint();

0 commit comments

Comments
 (0)