Skip to content

Commit

Permalink
disable telemetry in tests (#4183)
Browse files Browse the repository at this point in the history
flaky tests #4182
  • Loading branch information
PSeitz authored Nov 22, 2023
1 parent fa2efb2 commit 4348ba8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quickwit/quickwit-telemetry/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,13 @@ impl TelemetrySender {
}
}

/// telemetry is disabled in tests.
#[cfg(test)]
pub fn is_telemetry_disabled() -> bool {
true
}
/// Check to see if telemetry is enabled.
#[cfg(not(test))]
pub fn is_telemetry_disabled() -> bool {
std::env::var_os(crate::DISABLE_TELEMETRY_ENV_KEY).is_some()
}
Expand Down

0 comments on commit 4348ba8

Please sign in to comment.