Skip to content

Commit

Permalink
distributor: Increase test polling duration to allow the cache suffic…
Browse files Browse the repository at this point in the history
…ient time to update
  • Loading branch information
NickAnge committed Jan 7, 2025
1 parent e57c02c commit c3b674d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/distributor/ha_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ func TestHaTrackerWithMemberList(t *testing.T) {
// Update KVStore - this should elect replica 2.
tracker.updateKVStoreAll(context.Background(), now)

checkReplicaTimestamp(t, time.Second, tracker, "user", cluster, replica2, now, now)
// Evaluate up to 2 seconds to verify whether the tracker’s cache replica has been updated to r2.
checkReplicaTimestamp(t, 2*time.Second, tracker, "user", cluster, replica2, now, now)

// Now we should accept from replica 2.
err = tracker.checkReplica(context.Background(), "user", cluster, replica2, now)
Expand Down

0 comments on commit c3b674d

Please sign in to comment.