-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flaky CI tests #9010
Comments
This was referenced Apr 28, 2021
mergify bot
pushed a commit
that referenced
this issue
Apr 28, 2021
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
mergify bot
pushed a commit
that referenced
this issue
Apr 28, 2021
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
amaury1093
added a commit
that referenced
this issue
Apr 29, 2021
* 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]>
19 tasks
19 tasks
Please consider adding here to track: #11923 |
4 tasks
closing this since ci is less flaky with these tests |
github-project-automation
bot
moved this from In Progress
to Done
in Cosmos SDK Maintenance
May 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of Bug
A couple of tests are flaky. We should fix them.
Version
04246ef
Steps to Reproduce
I noticed several tests that are randomly failing (and more often in the past couple of weeks, but that's a subjective feeling).
TestCoinTestSuite
(RACE) https://github.com/cosmos/cosmos-sdk/runs/6293513010?check_suite_focus=truetmservice
times out after 30min intest-race (00)
#12420TestCompose
#12883TestIntegrationTestSuite/TestQueryBySig
#12975These flaky tests can be tackled separately.
For Admin Use
The text was updated successfully, but these errors were encountered: