Skip to content

Commit

Permalink
chore(ci): remove duplicate connect_and_accept_http1(..) function
Browse files Browse the repository at this point in the history
this commit removes a duplicate function that was errantly defined, due
to some issues when merging previous (interdependent) pr's.

see
- #3455
- #3454
- linkerd/linkerd2#8733

Signed-off-by: katelyn martin <kate@buoyant.io>
  • Loading branch information
cratelyn committed Dec 13, 2024
1 parent 03f5577 commit 1f228d1
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions linkerd/app/test/src/http_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,51 +54,6 @@ pub async fn connect_and_accept_http1(
(client, bg)
}

/// Connects a client and server, running a proxy between them.
///
/// Returns a tuple containing (1) a [`SendRequest`] that can be used to transmit a request and
/// await a response, and (2) a [`JoinSet<T>`] running background tasks.
pub async fn connect_and_accept_http1(
client_settings: &mut hyper::client::conn::http1::Builder,
server: BoxServer,
) -> (
hyper::client::conn::http1::SendRequest<hyper::Body>,
JoinSet<Result<(), Error>>,
) {
tracing::info!(settings = ?client_settings, "connecting client with");
let (client_io, server_io) = io::duplex(4096);

let (client, conn) = client_settings
.handshake(client_io)
.await
.expect("Client must connect");

let mut bg = tokio::task::JoinSet::new();
bg.spawn(
async move {
server
.oneshot(server_io)
.await
.map_err(ContextError::ctx("proxy background task failed"))?;
tracing::info!("proxy serve task complete");
Ok(())
}
.instrument(tracing::info_span!("proxy")),
);
bg.spawn(
async move {
conn.await
.map_err(ContextError::ctx("client background task failed"))
.map_err(Error::from)?;
tracing::info!("client background complete");
Ok(())
}
.instrument(tracing::info_span!("client_bg")),
);

(client, bg)
}

/// Connects a client and server, running a proxy between them.
///
/// Returns a tuple containing (1) a [`SendRequest`] that can be used to transmit a request and

Check warning on line 59 in linkerd/app/test/src/http_util.rs

View workflow job for this annotation

GitHub Actions / rust

warning: unresolved link to `SendRequest` --> linkerd/app/test/src/http_util.rs:59:40 | 59 | /// Returns a tuple containing (1) a [`SendRequest`] that can be used to transmit a request and | ^^^^^^^^^^^ no item named `SendRequest` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Expand Down

0 comments on commit 1f228d1

Please sign in to comment.