Skip to content

fix: silence all logging/tracing in tests#357

Merged
emlautarom1 merged 2 commits into
mainfrom
emlautarom1/remove-test-logs
Apr 29, 2026
Merged

fix: silence all logging/tracing in tests#357
emlautarom1 merged 2 commits into
mainfrom
emlautarom1/remove-test-logs

Conversation

@emlautarom1
Copy link
Copy Markdown
Collaborator

Several tests utilize the run functions exposed by the CLI commands, yet some of these functions initialize the pluto_tracing module, resulting in logs cluttering stdout when running the tests (cargo test). For example:

pub async fn run(
args: TestInfraArgs,
writer: &mut dyn Write,
ct: CancellationToken,
) -> Result<TestCategoryResult> {
pluto_tracing::init(
&pluto_tracing::TracingConfig::builder()
.with_default_console()
.build(),
)
.expect("Failed to initialize tracing");

This PR addresses this issue, ensuring that the pluto_tracing module is initialized only in main for which we don't have tests (and we don't intend to have either).

emlautarom1 and others added 2 commits April 28, 2026 18:11
- Avoids cluttering test output with logs

Co-authored-by: Copilot <copilot@github.com>
@emlautarom1 emlautarom1 merged commit 8bc2dcd into main Apr 29, 2026
11 checks passed
@emlautarom1 emlautarom1 deleted the emlautarom1/remove-test-logs branch April 29, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants