From 399d19231b0aaa3abf4670c7a6ba4014a04645c1 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 3 Apr 2025 10:51:23 -0400 Subject: [PATCH] Temporarily disable flaky conflicted-cherry-pick test (#27950) Closes #ISSUE Release Notes: - N/A --- crates/project/src/project_tests.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/project/src/project_tests.rs b/crates/project/src/project_tests.rs index 8c00b98423327834ba7d27b54f8a125a9c9a259c..45fcf678e069966632fa99519fa3372fda10e443 100644 --- a/crates/project/src/project_tests.rs +++ b/crates/project/src/project_tests.rs @@ -7535,9 +7535,8 @@ async fn test_repository_subfolder_git_status(cx: &mut gpui::TestAppContext) { }); } -// TODO: this test fails on Windows because upon cherry-picking we don't get an event in the .git directory, -// despite CHERRY_PICK_HEAD existing after the `git_cherry_pick` call and the conflicted path showing up in git status. -#[cfg(not(windows))] +// TODO: this test is flaky (especially on Windows but at least sometimes on all platforms). +#[cfg(any())] #[gpui::test] async fn test_conflicted_cherry_pick(cx: &mut gpui::TestAppContext) { init_test(cx); @@ -8413,7 +8412,7 @@ fn git_commit(msg: &'static str, repo: &git2::Repository) { } } -#[cfg(not(windows))] +#[cfg(any())] #[track_caller] fn git_cherry_pick(commit: &git2::Commit<'_>, repo: &git2::Repository) { repo.cherrypick(commit, None).expect("Failed to cherrypick"); @@ -8444,7 +8443,7 @@ fn git_reset(offset: usize, repo: &git2::Repository) { .expect("Could not reset"); } -#[cfg(not(windows))] +#[cfg(any())] #[track_caller] fn git_branch(name: &str, repo: &git2::Repository) { let head = repo @@ -8455,14 +8454,14 @@ fn git_branch(name: &str, repo: &git2::Repository) { repo.branch(name, &head, false).expect("Failed to commit"); } -#[cfg(not(windows))] +#[cfg(any())] #[track_caller] fn git_checkout(name: &str, repo: &git2::Repository) { repo.set_head(name).expect("Failed to set head"); repo.checkout_head(None).expect("Failed to check out head"); } -#[cfg(not(windows))] +#[cfg(any())] #[track_caller] fn git_status(repo: &git2::Repository) -> collections::HashMap { repo.statuses(None)