diff --git a/crates/ide-dap/src/tests.rs b/crates/ide-dap/src/tests.rs index 6010b949d..646420a52 100644 --- a/crates/ide-dap/src/tests.rs +++ b/crates/ide-dap/src/tests.rs @@ -72,10 +72,21 @@ async fn windows_stop_releases_the_debuggees_port_before_returning() { .unwrap(); let pid = child.0.id(); child.1 = Some(ide_core::process::ProcessTree::capture(pid)); - let h = harness(Script { debuggee_pid: Some(pid), supports_terminate, ..Default::default() }); + // A running program: one suspended at a breakpoint is killed at once (#3658), without the + // wait for its tree this test is about. + let h = harness(Script { + debuggee_pid: Some(pid), + supports_terminate, + continued_after_stop: true, + ..Default::default() + }); let id = h.start(config()).await.unwrap(); let session = h.manager.session(id).unwrap(); - while session.debuggee_pid.load(Ordering::Acquire) != i64::from(pid) { + // The pid, then the stop at launch and the `continued` that ends it. + while session.debuggee_pid.load(Ordering::Acquire) != i64::from(pid) + || session.suspended.ticket() == 0 + || session.suspended.get() + { tokio::time::sleep(Duration::from_millis(10)).await; } let stop = tokio::spawn({ diff --git a/crates/ide-host/src/plugins/ui_points.rs b/crates/ide-host/src/plugins/ui_points.rs index 91de1d59b..c3b4e24b7 100644 --- a/crates/ide-host/src/plugins/ui_points.rs +++ b/crates/ide-host/src/plugins/ui_points.rs @@ -1243,7 +1243,8 @@ mod tests { #[test] fn editor_panels_validate_api_width_when_capability_and_page() { let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../ide-plugin/tests/fixtures/editor-panel"); - let source = std::fs::read_to_string(root.join("plugin.toml")).unwrap(); + // A Windows checkout may have CRLF line ends; the edits below match on `\n`. + let source = std::fs::read_to_string(root.join("plugin.toml")).unwrap().replace("\r\n", "\n"); let check = |source: &str| { let manifest = ide_extension::Manifest::parse(source)?; let decl = manifest.declarations(EDITOR_PANELS).into_iter().next().unwrap(); diff --git a/crates/ide-host/tests/plugin_data_tools.rs b/crates/ide-host/tests/plugin_data_tools.rs index 763bea890..a62bdc7e8 100644 --- a/crates/ide-host/tests/plugin_data_tools.rs +++ b/crates/ide-host/tests/plugin_data_tools.rs @@ -80,7 +80,8 @@ impl Harness { } #[tokio::test(flavor = "multi_thread")] async fn database_calls_enforce_grants_trust_ownership_and_uninstall_lifetime() { - let f = Harness::new(); + // Nothing here tests the command budget, and a slow runner's first calls can exceed 250 ms. + let f = Harness::with_timeout(Duration::from_secs(10)); assert!(f.run("sources", None).is_err()); f.host.set_project_trust(&f.root, true, false).await.unwrap(); let source = f.source();