Skip to content
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

Closed
9 of 17 tasks
amaury1093 opened this issue Mar 26, 2021 · 2 comments
Closed
9 of 17 tasks

Fix flaky CI tests #9010

amaury1093 opened this issue Mar 26, 2021 · 2 comments
Assignees

Comments

@amaury1093
Copy link
Contributor

amaury1093 commented Mar 26, 2021

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).

These flaky tests can be tackled separately.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
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]>
@github-actions github-actions bot added the stale label Jul 24, 2021
@amaury1093 amaury1093 added pinned and removed stale labels Jul 30, 2021
@amaury1093 amaury1093 reopened this Jul 30, 2021
@github-actions github-actions bot added the stale label Sep 20, 2021
@julienrbrt julienrbrt self-assigned this Apr 23, 2022
@julienrbrt julienrbrt removed the stale label Apr 23, 2022
@julienrbrt julienrbrt moved this to In Progress in Cosmos SDK Maintenance Apr 25, 2022
@julienrbrt julienrbrt moved this from In Progress to Ready in Cosmos SDK Maintenance Apr 25, 2022
@julienrbrt julienrbrt moved this from Ready to In Progress in Cosmos SDK Maintenance May 4, 2022
@julienrbrt julienrbrt moved this to Todo in Cosmos-SDK May 6, 2022
@alexanderbez alexanderbez moved this from 📝 Todo to 💪 In Progress in Cosmos-SDK May 9, 2022
@tac0turtle tac0turtle removed the pinned label May 9, 2022
@p0mvn
Copy link
Member

p0mvn commented May 10, 2022

Please consider adding here to track: #11923

@tac0turtle
Copy link
Member

closing this since ci is less flaky with these tests

@github-project-automation github-project-automation bot moved this from 📝 Todo to 👏 Done in Cosmos-SDK May 3, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Cosmos SDK Maintenance May 3, 2023
@tac0turtle tac0turtle removed this from Cosmos-SDK Jul 18, 2023
@julienrbrt julienrbrt mentioned this issue Sep 18, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

6 participants