ethclient, accounts/keystore: fix flaky tests#23599
Merged
holiman merged 2 commits intoethereum:masterfrom Sep 20, 2021
Merged
Conversation
Contributor
Author
|
Another failing test:https://ci.appveyor.com/project/ethereum/go-ethereum/builds/40820338/job/4bm6h7cmv95l1u69#L713 This one is due to unixNano mainly being not-nano on windows, so the two tests reuse the same keystore. Fixed by modifying the folder names to no longer collide. |
7854516 to
6473dcd
Compare
6473dcd to
1ecf179
Compare
yongjun925
pushed a commit
to DODOEX/go-ethereum
that referenced
this pull request
Dec 3, 2022
* ethclient/gethclient: fix flaky test (due to map key ordering) * accounts/keystore: fix test failing due to rand collision due to low time resolution on windows
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jan 24, 2025
* ethclient/gethclient: fix flaky test (due to map key ordering) * accounts/keystore: fix test failing due to rand collision due to low time resolution on windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a flaky test,
ethclient/gethclient:TestGethClient. The reason it was flaky was that the table-driven test was actually a map-driven test, and the key order when iterating over the map is undefined. Some of the tests (particularly the setHead test) modifies the backend chain, which is problematic for the access list test, which fails if the basefee is too high.So this PR changes it to use a list instead.
Example failure: https://ci.appveyor.com/project/ethereum/go-ethereum/builds/40814331/job/oh9s50w4lgcxge8d#L821