From 3410a4e540c5af2870324a088548700595c28bb5 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 22:30:29 -0800 Subject: [PATCH] reduce prune flakiness --- host/storage/storage_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/storage/storage_test.go b/host/storage/storage_test.go index 63cfe469..11e4e1da 100644 --- a/host/storage/storage_test.go +++ b/host/storage/storage_test.go @@ -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) } @@ -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)