Skip to content

Commit

Permalink
Fixes for compiling on macOS (#1392)
Browse files Browse the repository at this point in the history
Several tests failed to compile, as they are not exercised in CI.

Signed-off-by: Jem McElwain <jmcelwain@gmail.com>
(cherry picked from commit cf72101)
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
jem authored and olix0r committed Mar 30, 2022
1 parent 57170ea commit 899e870
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions linkerd/app/integration/src/tests/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,7 @@ mod transport {
async fn inbound_tcp_connect_err() {
let _trace = trace_init();
let srv = tcp::server()
.accept_fut(move |sock| {
drop(sock);
future::ok(())
})
.accept_fut(move |sock| async { drop(sock) })
.run()
.await;
let proxy = proxy::new().inbound(srv).run().await;
Expand All @@ -1218,7 +1215,7 @@ mod transport {
let tcp_client = client.connect().await;

tcp_client.write(TcpFixture::HELLO_MSG).await;
assert_eq!(tcp_client.read().await, &[]);
assert_eq!(tcp_client.read().await, &[] as &[u8]);
// Connection to the server should be a failure with the EXFULL error
metrics::metric("tcp_close_total")
.label("peer", "dst")
Expand All @@ -1240,15 +1237,12 @@ mod transport {
.await;
}

#[test]
#[tokio::test]
#[cfg(target_os = "macos")]
fn outbound_tcp_connect_err() {
async fn outbound_tcp_connect_err() {
let _trace = trace_init();
let srv = tcp::server()
.accept_fut(move |sock| {
drop(sock);
future::ok(())
})
.accept_fut(move |sock| async { drop(sock) })
.run()
.await;
let proxy = proxy::new().outbound(srv).run().await;
Expand All @@ -1259,7 +1253,7 @@ mod transport {
let tcp_client = client.connect().await;

tcp_client.write(TcpFixture::HELLO_MSG).await;
assert_eq!(tcp_client.read().await, &[]);
assert_eq!(tcp_client.read().await, &[] as &[u8]);
// Connection to the server should be a failure with the EXFULL error
metrics::metric("tcp_close_total")
.label("peer", "dst")
Expand Down

0 comments on commit 899e870

Please sign in to comment.