Skip to content

Commit

Permalink
reduce prune flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Dec 7, 2024
1 parent 0f757f6 commit 3410a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ func TestStoragePrune(t *testing.T) {
defer db.Close()

// initialize the storage manager
vm, err := storage.NewVolumeManager(db, storage.WithLogger(log.Named("volumes")), storage.WithCacheSize(0), storage.WithPruneInterval(time.Second))
vm, err := storage.NewVolumeManager(db, storage.WithLogger(log.Named("volumes")), storage.WithCacheSize(0), storage.WithPruneInterval(500*time.Millisecond))
if err != nil {
t.Fatal(err)
}
Expand All @@ -1169,7 +1169,7 @@ func TestStoragePrune(t *testing.T) {
assertUsedSectors := func(t *testing.T, used uint64) {
t.Helper()

time.Sleep(time.Second) // prune interval
time.Sleep(2 * time.Second) // note: longer than prune interval for timing issues
volume, err := vm.Volume(vol.ID)
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 3410a4e

Please sign in to comment.