From 806cc5cad9ac8abc3c29537a9f27bec66f409389 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 12 Jun 2025 08:05:25 -0500 Subject: [PATCH] Debug `sync_dry_run` flake by panicking with verbose output on failure (#13817) Investigating #13744 I tried reproducing here by running the test in a loop, but could not. I presume it's an interaction with other tests. This drops the snapshot, but I think it's worth it to try to examine the flake? --- crates/uv/tests/it/sync.rs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index 6503a279b..3f3cd072c 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -7879,18 +7879,13 @@ fn sync_dry_run() -> Result<()> { + iniconfig==2.0.0 "###); - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r###" - success: true - exit_code: 0 - ----- stdout ----- - - ----- stderr ----- - Discovered existing environment at: .venv - Resolved 2 packages in [TIME] - Found up-to-date lockfile at: uv.lock - Audited 1 package in [TIME] - Would make no changes - "###); + let output = context.sync().arg("--dry-run").arg("-vv").output()?; + let stderr = String::from_utf8_lossy(&output.stderr); + assert!( + !stderr.contains("Would replace existing virtual environment"), + "{}", + stderr + ); Ok(()) }