Commit 61a4347
authored
fix(ring): Fix flaky TestTokenFileOnDisk_WithoutAutoJoinOnStartup (#7504)
Remove the racy `len(desc.Ingesters) == 1` assertion from the last poll
in TestTokenFileOnDisk_WithoutAutoJoinOnStartup. After l1 stops and
unregisters, its pending time.AfterFunc heartbeat goroutine can fire and
re-add ing1 to the ring via updateConsul (which re-inserts the instance
when it finds the ring empty for its ID). This race makes the single-
ingester assertion flaky.
The test's purpose is to verify that ing2 joins with the correct state
(READONLY) and tokens (512, from the token file) — not that ing1 is
absent. Removing this assertion fixes the flake without weakening the
test's coverage.
Also increase the poll timeout from 1s to 5s for CI reliability on
slower arm64 runners.
Signed-off-by: Ben Ye <benye@amazon.com>1 parent 55e300e commit 61a4347
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | | - | |
| 1076 | + | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | | - | |
1085 | 1084 | | |
1086 | 1085 | | |
1087 | 1086 | | |
| |||
0 commit comments