Skip to content

Commit f2ad745

Browse files
authored
chore(ci): remove duplicate connect_and_accept_http1(..) function (#3461)
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 <[email protected]>
1 parent 03f5577 commit f2ad745

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

linkerd/app/test/src/http_util.rs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -54,51 +54,6 @@ pub async fn connect_and_accept_http1(
5454
(client, bg)
5555
}
5656

57-
/// Connects a client and server, running a proxy between them.
58-
///
59-
/// Returns a tuple containing (1) a [`SendRequest`] that can be used to transmit a request and
60-
/// await a response, and (2) a [`JoinSet<T>`] running background tasks.
61-
pub async fn connect_and_accept_http1(
62-
client_settings: &mut hyper::client::conn::http1::Builder,
63-
server: BoxServer,
64-
) -> (
65-
hyper::client::conn::http1::SendRequest<hyper::Body>,
66-
JoinSet<Result<(), Error>>,
67-
) {
68-
tracing::info!(settings = ?client_settings, "connecting client with");
69-
let (client_io, server_io) = io::duplex(4096);
70-
71-
let (client, conn) = client_settings
72-
.handshake(client_io)
73-
.await
74-
.expect("Client must connect");
75-
76-
let mut bg = tokio::task::JoinSet::new();
77-
bg.spawn(
78-
async move {
79-
server
80-
.oneshot(server_io)
81-
.await
82-
.map_err(ContextError::ctx("proxy background task failed"))?;
83-
tracing::info!("proxy serve task complete");
84-
Ok(())
85-
}
86-
.instrument(tracing::info_span!("proxy")),
87-
);
88-
bg.spawn(
89-
async move {
90-
conn.await
91-
.map_err(ContextError::ctx("client background task failed"))
92-
.map_err(Error::from)?;
93-
tracing::info!("client background complete");
94-
Ok(())
95-
}
96-
.instrument(tracing::info_span!("client_bg")),
97-
);
98-
99-
(client, bg)
100-
}
101-
10257
/// Connects a client and server, running a proxy between them.
10358
///
10459
/// Returns a tuple containing (1) a [`SendRequest`] that can be used to transmit a request and

0 commit comments

Comments
 (0)