You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix TestAlertmanager_StateReplicationWithSharding.
The test had two issues:
1. The most common issue was that replicating the silence sometimes
took a small amount of time, as it happens asynchronously. Replacing
Equal with Eventually when checking the replication metrics is enough
to make the tests reliable.
2. The second issue was more rare: When a particular shard does not have
any users assigned to it, _and_ the test randomly picks _that_ shard
to write the silence to, the test would panic (in rand.Intn). Due to
the alertmanagersMtx being held, the test actually just hung up while
trying to shutdown the alertmanagers.
Signed-off-by: Steve Simpson <[email protected]>
* Review comments.
Signed-off-by: Steve Simpson <[email protected]>
0 commit comments