Skip to content

Commit 421e139

Browse files
committed
v0.1.21
1 parent bdcd2c7 commit 421e139

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

rust/crates/memorph/src/api.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,10 @@ mod tests {
23362336
static TEST_LOCK: OnceLock<Mutex<()>> = OnceLock::new();
23372337

23382338
fn test_guard() -> std::sync::MutexGuard<'static, ()> {
2339-
TEST_LOCK.get_or_init(|| Mutex::new(())).lock().unwrap()
2339+
TEST_LOCK
2340+
.get_or_init(|| Mutex::new(()))
2341+
.lock()
2342+
.unwrap_or_else(|poisoned| poisoned.into_inner())
23402343
}
23412344

23422345
struct ConfigTestHome {
@@ -2848,7 +2851,7 @@ mod tests {
28482851
.contains("Unsupported compression archive ref"));
28492852
}
28502853

2851-
#[tokio::test]
2854+
#[tokio::test(flavor = "current_thread")]
28522855
async fn compression_retrieve_route_returns_query_matches_from_archive() {
28532856
let fixture = write_api_retrieve_archive_fixture();
28542857
eprintln!("fixture created: {}", fixture.archive_ref);
@@ -3063,7 +3066,7 @@ mod tests {
30633066
);
30643067
}
30653068

3066-
#[tokio::test]
3069+
#[tokio::test(flavor = "current_thread")]
30673070
async fn provider_setting_update_syncs_legacy_settings_payload() {
30683071
let dir = tempfile::tempdir().unwrap();
30693072
let _home = ConfigTestHome::new(dir.path());
@@ -3091,7 +3094,7 @@ mod tests {
30913094
assert_eq!(settings_value["data"]["show_opencode_subagents"], true);
30923095
}
30933096

3094-
#[tokio::test]
3097+
#[tokio::test(flavor = "current_thread")]
30953098
async fn legacy_settings_update_syncs_provider_setting_payload() {
30963099
let dir = tempfile::tempdir().unwrap();
30973100
let _home = ConfigTestHome::new(dir.path());
@@ -3141,11 +3144,12 @@ mod tests {
31413144
assert_eq!(setting_value["data"]["value"], true);
31423145
}
31433146

3144-
#[tokio::test]
3147+
#[tokio::test(flavor = "current_thread")]
31453148
async fn meta_route_exposes_resolved_backup_and_log_paths() {
3146-
let dir = tempfile::tempdir().unwrap();
3147-
let _home = ConfigTestHome::new(dir.path());
3148-
let workspace_dir = dir.path().join("workspace");
3149+
let home_dir = tempfile::tempdir().unwrap();
3150+
let workspace_root = tempfile::tempdir().unwrap();
3151+
let _home = ConfigTestHome::new(home_dir.path());
3152+
let workspace_dir = workspace_root.path().join("workspace");
31493153
std::fs::create_dir_all(&workspace_dir).unwrap();
31503154
crate::config::remember_workspace(&workspace_dir).unwrap();
31513155

0 commit comments

Comments
 (0)