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

Intermittent test failure in keystore_test #782

Closed
timmoreton opened this issue Jan 3, 2020 · 2 comments · Fixed by #1254
Closed

Intermittent test failure in keystore_test #782

timmoreton opened this issue Jan 3, 2020 · 2 comments · Fixed by #1254

Comments

@timmoreton
Copy link
Contributor

--- FAIL: TestWalletNotifications (0.59s)
    keystore_test.go:344: wallet list doesn't match required accounts: have 541, want 540
    keystore_test.go:372: can't find event with Kind=0 for a91e42fdafd05897598dd5a28219a125ffde0218
FAIL
@shibe-dev
Copy link
Contributor

hi tim and mariano! i'd love to attempt this. you said it's intermittent, is there any reliable way of recreating the error?

@mcortesi mcortesi added this to the Milestone 8 milestone Dec 3, 2020
@oneeman oneeman self-assigned this Dec 4, 2020
@oneeman
Copy link
Contributor

oneeman commented Dec 4, 2020

Thanks @howydev! Sorry for the late reply. It looks like this has been fixed upstream recently (ethereum/go-ethereum#21703), so we can cherry-pick the fix (I'll open up a PR).

To answer your question, what I usually do to recreate intermittent test failures is run the test many times, using the -count argument. For this test it would be something like:

go test ./accounts/keystore -run ^TestWalletNotifications$ -count 50 

However, with this test I couldn't get it to fail. In some cases, tests fail in CI that don't fail locally (I imagine it's because the CI machines are slower), which makes things harder, and that seems to be the case with this one.

@mergify mergify bot closed this as completed in #1254 Dec 14, 2020
mergify bot pushed a commit that referenced this issue Dec 14, 2020
Cherry-pick ethereum/go-ethereum#21703 from upstream to fix the flaky test `TestWalletNotifications`.

### Tested

* Tests pass locally and in CI

### Related issues

- Fixes #782

### Backwards compatibility

No concerns, only modifies a test, unrelated to protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants