Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/storage/tsdb/bucketindex/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ func TestLoader_ShouldCacheIndexNotFoundOnBackgroundUpdates(t *testing.T) {
// Wait until the next index load attempt occurs.
prevLoads := testutil.ToFloat64(loader.loadAttempts)
test.Poll(t, 3*time.Second, true, func() interface{} {
return testutil.ToFloat64(loader.loadAttempts) > prevLoads
// loadAttempts is incremented before the indexes are updated so we also check countLoadedIndexesMetric()
return testutil.ToFloat64(loader.loadAttempts) > prevLoads && loader.countLoadedIndexesMetric() == 0
})

// We expect the bucket index is not considered loaded because of the error.
Expand Down
Loading