mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-08-09 20:54:28 +02:00
refactor: update logic and locks around vpn extensions
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user