Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(storage): gate fd lifetime test on sqlite feature

Steven Enamakel39beb5ca586e
diff --git a/crates/openhuman-core/src/flows/catalog_storage_resource_tests.rs b/crates/openhuman-core/src/flows/catalog_storage_resource_tests.rs
index eee48f4e49..faf14e6116 100644
--- a/crates/openhuman-core/src/flows/catalog_storage_resource_tests.rs
+++ b/crates/openhuman-core/src/flows/catalog_storage_resource_tests.rs
@@ -23,6 +23,7 @@ fn open_fd_count() -> usize {
}
#[tokio::test]
+#[cfg(feature = "storage-sqlite")]
async fn workspace_fd_lifetime_is_separate_from_catalog_callback_lifetime() {
// Warm the process-wide bus before measuring. Serving additional callback
// objects should only add entries to that shared bus, not open a backend.
@@ -39,6 +40,7 @@ async fn workspace_fd_lifetime_is_separate_from_catalog_callback_lifetime() {
workspace_dir: workspace.path().to_path_buf(),
..Config::default()
};
+ crate::storage::local::use_persistent_default_for_test(workspace.path());
let context = context(&config, &format!("fd-probe-{index}"));
registrations.push(
register(&context, &config)
diff --git a/crates/openhuman-core/src/storage/local.rs b/crates/openhuman-core/src/storage/local.rs
index 6b16ed9599..e459f6f426 100644
--- a/crates/openhuman-core/src/storage/local.rs
+++ b/crates/openhuman-core/src/storage/local.rs
@@ -59,7 +59,7 @@ static TEST_WORKSPACE_URLS: LazyLock<Mutex<HashMap<PathBuf, String>>> =
LazyLock::new(Mutex::default);
#[cfg(all(test, feature = "storage-sqlite"))]
-pub(super) fn use_persistent_default_for_test(workspace_dir: &Path) {
+pub(crate) fn use_persistent_default_for_test(workspace_dir: &Path) {
TEST_WORKSPACE_URLS
.lock()
.unwrap_or_else(PoisonError::into_inner)