Skip to content

Commit 5375ee7

Browse files
committed
don't run background snapshots in our test harness
1 parent 15b732d commit 5375ee7

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

turbopack/crates/turbo-tasks-backend/tests/eviction.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ fn create_tt_with_workers(
2929
BackendOptions {
3030
num_workers: Some(num_workers),
3131
small_preallocation: true,
32-
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWrite),
32+
// Avoid racing with the background snapshot loop; the test drives
33+
// snapshot_and_evict_for_testing manually.
34+
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWriteOnShutdown),
3335
evict_after_snapshot: true,
3436
..Default::default()
3537
},
@@ -61,7 +63,9 @@ fn create_tt(name: &str) -> Arc<TurboTasks<TurboTasksBackend<TurboBackingStorage
6163
BackendOptions {
6264
num_workers: Some(2),
6365
small_preallocation: true,
64-
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWrite),
66+
// Avoid racing with the background snapshot loop; the test drives
67+
// snapshot_and_evict_for_testing manually.
68+
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWriteOnShutdown),
6569
evict_after_snapshot: true,
6670
..Default::default()
6771
},

turbopack/crates/turbo-tasks-backend/tests/test_config.trs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
num_workers: Some(2),
1313
small_preallocation: true,
1414
evict_after_snapshot: true,
15+
// Avoid racing with the background snapshot loop; the test drives
16+
// snapshot_and_evict_for_testing manually.
17+
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWriteOnShutdown),
1518
..Default::default()
1619
},
1720
turbo_tasks_backend::turbo_backing_storage(

0 commit comments

Comments
 (0)