From 90cbfd288e717ff8b65827ff09f83eb479d6be9a Mon Sep 17 00:00:00 2001 From: Yakov Till Date: Fri, 3 Apr 2026 03:29:33 +0200 Subject: [PATCH] Fix test_history_path_detection panic: call test_init() test_history_path_detection calls add_pending_with_file_detection(), which spawns a thread pool task via ThreadPool::perform(). This requires threads::init() to have been called, otherwise assert_is_background_thread() panics. Add the missing test_init() call, matching other tests that use subsystems requiring initialization. Closes #12604 --- src/history/history.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/history/history.rs b/src/history/history.rs index 4ae79a14c..dd6fd8ef1 100644 --- a/src/history/history.rs +++ b/src/history/history.rs @@ -1810,6 +1810,7 @@ mod tests { use crate::env::{EnvMode, EnvSetMode, EnvStack}; use crate::fs::{LockedFile, WriteMethod}; use crate::prelude::*; + use crate::tests::prelude::test_init; use fish_build_helper::workspace_root; use fish_wcstringutil::{ string_prefixes_string, string_prefixes_string_case_insensitive, wcs2bytes, @@ -2292,6 +2293,7 @@ fn test_history_merge() { #[test] fn test_history_path_detection() { + let _cleanup = test_init(); // Regression test for #7582. // Temporary directory for the history files. let hist_tmpdir = fish_tempfile::new_dir().unwrap();