Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* x/gov/keeper: fix flaky TestPaginatedVotesQuery (#9223) When testing with -race, sometimes the random source generate the same string for consecutive calls, causing duplicated voter address. So the number of votes in DB is not 20. To fix this, we ensure unique addresses are generated, by using a map for tracking which one was produced, and skip the duplicated address and generated new one. Testing with: go test -race -v -count=1000 -run=TestPaginatedVotesQuery now passes. Updates #9010 (cherry picked from commit 6ad84c5) # Conflicts: # x/gov/keeper/querier_test.go * fi merge conflict Co-authored-by: Cuong Manh Le <[email protected]> Co-authored-by: Amaury M <[email protected]>
- Loading branch information