From a7df5e9baac760144f220c5de0cb09e38325076b Mon Sep 17 00:00:00 2001 From: Jem McElwain Date: Thu, 2 Dec 2021 16:07:36 -0800 Subject: [PATCH] Fixes for compiling on macOS Signed-off-by: Jem McElwain --- linkerd/app/integration/src/tests/telemetry.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/linkerd/app/integration/src/tests/telemetry.rs b/linkerd/app/integration/src/tests/telemetry.rs index 17aab71ea7..5dddccc7c2 100644 --- a/linkerd/app/integration/src/tests/telemetry.rs +++ b/linkerd/app/integration/src/tests/telemetry.rs @@ -1199,10 +1199,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; @@ -1213,7 +1210,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") @@ -1233,15 +1230,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; @@ -1252,7 +1246,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")