Skip to content

Commit 92538c2

Browse files
author
Jem McElwain
committed
Fixes for compiling on macOS
Signed-off-by: Jem McElwain <jmcelwain@gmail.com>
1 parent 8df696d commit 92538c2

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ shellcheck:
101101

102102
.PHONY: test
103103
test: fetch
104+
ifeq ($(findstring darwin,$(CARGO_TARGET)),darwin)
105+
$(CARGO_TEST) --workspace --exclude linkerd-system
106+
else
104107
$(CARGO_TEST)
108+
endif
105109

106110
.PHONY: package
107111
package: $(PKG_ROOT)/$(PKG)

linkerd/app/integration/src/tests/telemetry.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,10 +1199,7 @@ mod transport {
11991199
async fn inbound_tcp_connect_err() {
12001200
let _trace = trace_init();
12011201
let srv = tcp::server()
1202-
.accept_fut(move |sock| {
1203-
drop(sock);
1204-
future::ok(())
1205-
})
1202+
.accept_fut(move |sock| async { drop(sock) })
12061203
.run()
12071204
.await;
12081205
let proxy = proxy::new().inbound(srv).run().await;
@@ -1213,7 +1210,7 @@ mod transport {
12131210
let tcp_client = client.connect().await;
12141211

12151212
tcp_client.write(TcpFixture::HELLO_MSG).await;
1216-
assert_eq!(tcp_client.read().await, &[]);
1213+
assert_eq!(tcp_client.read().await, &[] as &[u8]);
12171214
// Connection to the server should be a failure with the EXFULL error
12181215
metrics::metric("tcp_close_total")
12191216
.label("peer", "dst")
@@ -1233,15 +1230,12 @@ mod transport {
12331230
.await;
12341231
}
12351232

1236-
#[test]
1233+
#[tokio::test]
12371234
#[cfg(target_os = "macos")]
1238-
fn outbound_tcp_connect_err() {
1235+
async fn outbound_tcp_connect_err() {
12391236
let _trace = trace_init();
12401237
let srv = tcp::server()
1241-
.accept_fut(move |sock| {
1242-
drop(sock);
1243-
future::ok(())
1244-
})
1238+
.accept_fut(move |sock| async { drop(sock) })
12451239
.run()
12461240
.await;
12471241
let proxy = proxy::new().outbound(srv).run().await;
@@ -1252,7 +1246,7 @@ mod transport {
12521246
let tcp_client = client.connect().await;
12531247

12541248
tcp_client.write(TcpFixture::HELLO_MSG).await;
1255-
assert_eq!(tcp_client.read().await, &[]);
1249+
assert_eq!(tcp_client.read().await, &[] as &[u8]);
12561250
// Connection to the server should be a failure with the EXFULL error
12571251
metrics::metric("tcp_close_total")
12581252
.label("peer", "dst")

0 commit comments

Comments
 (0)