chore(app/inbound): address hyper deprecations in http/1 tests #3454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this is a follow-up commit related to 24dc5d8 (#3445).
see linkerd/linkerd2#8733 for more information on upgrading to hyper 1.0.
this addresses hyper deprecations in the http/1 tests for the inbound proxy.
prior, we made use of
tower::ServiceExt::oneshot
, which consumes a service and drops it after sending a request and polling the response future to completion.https://docs.rs/tower/0.5.2/src/tower/util/oneshot.rs.html#96-100
tower is not a 1.0 library yet, so
SendRequest
does not provide an implementation oftower::Service
in hyper's 1.0 interface:consequentially, we must drop the sender ourselves after receiving a response now.
this commit also addresses hyper deprecations in the http/1 downgrade tests for the inbound proxy.
because these tests involve a http/2 client and an http/1 server, we take the choice of inlining the body of
http_util::connect_and_accept()
rather than introducing a new, thirdhttp_util::connect_and_accept_http_downgrade()
function.we will refactor these helper functions separately.
NB: because
ContextError
is internal to thelinkerd-app-test
crate, we do not wrap the errors. these are allegedly used by the fuzzing tests (see f.ex #986 and #989), but for our purposes with respect to the inbound proxy we can elide them rather than makingctx()
a public method.