From a895df4e697a5d0b0665c98d89b51e1ce651337d Mon Sep 17 00:00:00 2001 From: Dino Date: Wed, 8 Apr 2026 17:25:57 +0100 Subject: [PATCH] sidebar: Remove flaky test (#53418) This test is failing quite frequently in the CI/CD that runs for Preview release. Release Notes: - N/A --- crates/sidebar/src/sidebar_tests.rs | 76 ----------------------------- 1 file changed, 76 deletions(-) diff --git a/crates/sidebar/src/sidebar_tests.rs b/crates/sidebar/src/sidebar_tests.rs index 860713e61de2af4cc426370872d93b7da114411c..74df2044894a33645d3b50c4104aaa61d18a5b0a 100644 --- a/crates/sidebar/src/sidebar_tests.rs +++ b/crates/sidebar/src/sidebar_tests.rs @@ -6096,80 +6096,4 @@ mod property_test { Ok(()) } - - #[gpui::property_test(config = ProptestConfig { - cases: 50, - ..Default::default() - })] - async fn test_sidebar_invariants( - #[strategy = gpui::proptest::collection::vec(0u32..DISTRIBUTION_SLOTS * 10, 1..5)] - raw_operations: Vec, - cx: &mut TestAppContext, - ) { - agent_ui::test_support::init_test(cx); - cx.update(|cx| { - ThreadStore::init_global(cx); - ThreadMetadataStore::init_global(cx); - language_model::LanguageModelRegistry::test(cx); - prompt_store::init(cx); - - // Auto-add an AgentPanel to every workspace so that implicitly - // created workspaces (e.g. from thread activation) also have one. - cx.observe_new( - |workspace: &mut Workspace, - window: Option<&mut Window>, - cx: &mut gpui::Context| { - if let Some(window) = window { - let panel = cx.new(|cx| AgentPanel::test_new(workspace, window, cx)); - workspace.add_panel(panel, window, cx); - } - }, - ) - .detach(); - }); - - let fs = FakeFs::new(cx.executor()); - fs.insert_tree( - "/my-project", - serde_json::json!({ - ".git": {}, - "src": {}, - }), - ) - .await; - cx.update(|cx| ::set_global(fs.clone(), cx)); - let project = - project::Project::test(fs.clone() as Arc, ["/my-project".as_ref()], cx) - .await; - project.update(cx, |p, cx| p.git_scans_complete(cx)).await; - - let (multi_workspace, cx) = - cx.add_window_view(|window, cx| MultiWorkspace::test_new(project.clone(), window, cx)); - let sidebar = setup_sidebar(&multi_workspace, cx); - - let mut state = TestState::new(fs); - let mut executed: Vec = Vec::new(); - - for &raw_op in &raw_operations { - let project_group_count = - multi_workspace.read_with(cx, |mw, _| mw.project_group_keys().count()); - let operation = state.generate_operation(raw_op, project_group_count); - executed.push(format!("{:?}", operation)); - perform_operation(operation, &mut state, &multi_workspace, &sidebar, cx).await; - cx.run_until_parked(); - - update_sidebar(&sidebar, cx); - cx.run_until_parked(); - - let result = - sidebar.read_with(cx, |sidebar, cx| validate_sidebar_properties(sidebar, cx)); - if let Err(err) = result { - let log = executed.join("\n "); - panic!( - "Property violation after step {}:\n{err}\n\nOperations:\n {log}", - executed.len(), - ); - } - } - } }