refactor: update logic and locks around vpn extensions

This commit is contained in:
zhom
2026-08-08 19:27:39 +04:00
parent 70a8deb7eb
commit f8532be8af
25 changed files with 885 additions and 299 deletions
+8
View File
@@ -1569,6 +1569,14 @@ mod tests {
let _guard = INDEX_TESTS
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner);
// Applying a session transition also drives `remote_handoff`: it mutates
// that module's process-global store and persists the launch gate to the
// data directory. Its lock keeps the two test groups from clobbering each
// other's `p1`/`p2` fixtures, and the scratch directory keeps the gate file
// out of the developer's own app data.
let _handoff = crate::remote_handoff::lock_for_test();
let dir = tempfile::TempDir::new().expect("a scratch directory");
let _data_dir = crate::app_dirs::set_test_data_dir(dir.path().to_path_buf());
with_index(|map| map.clear());
with_endpoints(|map| map.clear());
INDEX_AUTHORITATIVE.store(false, Ordering::SeqCst);