Skip to content
Merged
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
9 changes: 9 additions & 0 deletions pkg/alertmanager/multitenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,15 @@ func TestMultitenantAlertmanager_zoneAwareSharding(t *testing.T) {
am2ZoneA := createInstance(2, "zoneA", registriesZoneA)
am1ZoneB := createInstance(3, "zoneB", registriesZoneB)

// Wait until every instance's ring client sees all the instances, otherwise
// ownership is computed against a partial ring view and tenants may get
// double-counted.
for _, am := range []*MultitenantAlertmanager{am1ZoneA, am2ZoneA, am1ZoneB} {
test.Poll(t, 5*time.Second, 3, func() any {
return am.ring.InstancesCount()
})
}

{
require.NoError(t, alertStore.SetAlertConfig(ctx, alertspb.AlertConfigDesc{
User: user1,
Expand Down