diff --git a/internal/test/e2e/gouging_test.go b/internal/test/e2e/gouging_test.go index 440879972..dc52a39f7 100644 --- a/internal/test/e2e/gouging_test.go +++ b/internal/test/e2e/gouging_test.go @@ -93,14 +93,14 @@ func TestGouging(t *testing.T) { if err := h.UpdateSettings(settings); err != nil { t.Fatal(err) } - } - // make sure the price table expires so the worker is forced to fetch it - // again, this is necessary for the host to be considered price gouging - time.Sleep(defaultHostSettings.PriceTableValidity) + // scan the host + tt.OKAll(cluster.Bus.ScanHost(context.Background(), h.PublicKey(), time.Second)) + } + time.Sleep(testWorkerCfg().CacheExpiry) // wait for cache to refresh - // download the data - should still work - tt.OKAll(w.DownloadObject(context.Background(), io.Discard, testBucket, path, api.DownloadObjectOptions{})) + // download the data - won't work since the hosts are not usable anymore + tt.FailAll(w.DownloadObject(context.Background(), io.Discard, testBucket, path, api.DownloadObjectOptions{})) // try optimising gouging settings resp, err := cluster.Autopilot.EvaluateConfig(context.Background(), test.AutopilotConfig, gs, test.RedundancySettings)