Skip to content

Commit c71626f

Browse files
committed
test: remove env::set_var call in test logging initialization
Per rust-lang/rust#90308, this is potentially a data race. In practice, I don't think it was actually problematic here, but it also wasn't doing anything of value, so we should remove it. This is currently the only `env::set_var` or `env::remove_var` call in the proxy. Closes linkerd/linkerd2#7651
1 parent d3cf6a0 commit c71626f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

linkerd/tracing/src/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub fn trace_subscriber(default: impl ToString) -> (Dispatch, Handle) {
1111
.or_else(|_| env::var("RUST_LOG"))
1212
.unwrap_or_else(|_| default.to_string());
1313
let log_format = env::var("LINKERD2_PROXY_LOG_FORMAT").unwrap_or_else(|_| "PLAIN".to_string());
14-
env::set_var("LINKERD2_PROXY_LOG_FORMAT", &log_format);
1514
// This may fail, since the global log compat layer may have been
1615
// initialized by another test.
1716
let _ = init_log_compat();

0 commit comments

Comments
 (0)