Commit 1c0ca17
fix: use assert.Eventually in TestReactorRecordsVotesAndBlockParts (#2841)
## Summary
- Replace one-shot `assert.Equal` assertions with `assert.Eventually` in
`TestReactorRecordsVotesAndBlockParts` to fix a flaky test
- The race condition occurs because peer state vote/block-part counters
may not be updated by the time assertions run after waiting for the
first block
- Also fixes a copy-paste typo in the second assertion message ("number
of votes sent" → "number of block parts sent")
## Test plan
- [x] Ran `TestReactorRecordsVotesAndBlockParts` 3 times with `-race`
flag — all passed
- [ ] CI passes on this PR
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 9442c08)1 parent 262ba39 commit 1c0ca17
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
459 | 463 | | |
460 | 464 | | |
461 | 465 | | |
| |||
0 commit comments