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

test: fix TestTxPool_ExpiredTxs_Timestamp flake #1573

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

tuantran1702
Copy link
Contributor

Description

Closes #1207

Rationale

After a lot of trial and errors and some research, the rationale behind this change of flaky test is:

Because the TTL is 5ms which is very short, we need to have a more precise pruning interval to ensure that the transactions are expired, so that the expired event is caught quickly enough, while the second batch of transactions are not expired to prevent flaky behaviors.

Testing method

go test -run TestTxPool_ExpiredTxs_Timestamp github.com/tendermint/tendermint/mempool/cat -mod=readonly -race -count 100

I run this command 200 times and see no failing one, which is kind of reliable compare to failing rate of 15-20% of old implemetation


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use
    unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

@tuantran1702 tuantran1702 requested a review from a team as a code owner December 20, 2024 17:37
@tuantran1702 tuantran1702 requested review from cmwaters and rach-id and removed request for a team December 20, 2024 17:37
@rootulp rootulp changed the title fix flaky test test: fix TestTxPool_ExpiredTxs_Timestamp flake Dec 20, 2024
rootulp
rootulp previously approved these changes Dec 20, 2024
@rootulp rootulp merged commit e8d1b46 into celestiaorg:v0.34.x-celestia Jan 2, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flake in TestTxPool_ExpiredTxs_Timestamp
3 participants