cosmos-sdk/x/gov
Cuong Manh Le 6ad84c5065
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
2021-04-28 17:08:42 +00:00
..
client Make integration test suites reusable by apps (#6711) 2021-04-23 14:49:49 -04:00
keeper x/gov/keeper: fix flaky TestPaginatedVotesQuery (#9223) 2021-04-28 17:08:42 +00:00
legacy Add 0.43 CLI JSON `migrate` command (#8880) 2021-03-22 11:30:26 +00:00
simulation merged in master 2021-03-21 16:37:06 -04:00
spec MsgWeightedVote -> MsgVoteWeighted 2021-01-24 20:54:25 -05:00
types Add more details in error message for invalid vote option (#9185) 2021-04-28 10:19:08 +00:00
abci.go Add hooks to governance actions (#9133) 2021-04-21 12:59:30 -04:00
abci_test.go merged in master 2021-03-21 16:37:06 -04:00
common_test.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
genesis.go [Bank] Remove the unsafe balance changing API (#8473) 2021-02-17 18:20:33 +00:00
genesis_test.go [Bank] Remove the unsafe balance changing API (#8473) 2021-02-17 18:20:33 +00:00
handler.go MsgWeightedVote -> MsgVoteWeighted 2021-01-24 20:54:25 -05:00
handler_test.go Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references (#7056) 2020-08-17 09:04:50 +00:00
module.go x{stake,slash,gov,distrib} In-place Store Migrations (#8504) 2021-02-25 10:43:31 +00:00
module_test.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00