-
-
Notifications
You must be signed in to change notification settings - Fork 411
test: fix few e2e flaky tests #7762
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7762 +/- ##
=========================================
Coverage 56.07% 56.07%
=========================================
Files 823 823
Lines 58017 58017
Branches 4465 4465
=========================================
Hits 32531 32531
Misses 25418 25418
Partials 68 68 🚀 New features to boost your workflow:
|
Performance Report✔️ no performance regression detected Full benchmark results
|
63cd115 to
7e9982e
Compare
| // Used only for sleep() statements | ||
| this.controller.abort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change protects from scenarios where connection and libp2p dependencies are cleanup before properly saying goodbye. Identified through a lot of errors during e2e tests.
May-02 11:06:48.905[reqresp-main-B] verbose: Req error method=goodbye, version=1, encoding=ssz_snappy, client=Lodestar, peer=16...koSwxP, requestId=6 - REQUEST_ERROR_DIAL_ERROR
| sequence: { | ||
| concurrent: false, | ||
| shuffle: false, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a behavior change, but will help to make sure that behavior does not change unintentionally in future.
**Motivation** Fix the behavior for reqresp to avoid unncessary response timeout. **Description** During debugging of the e2e flaky tests #7762 found some edge case for unnecessary response timeout. **Steps to test or reproduce** Run all tests
f6e6567 to
d70f69d
Compare
nflaig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, how do we test this? ideally we should add some load to CI and see if E2E tests in this PR don't fail due to it
|
|
||
| beforeEach(() => { | ||
| controller = new AbortController(); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to abort the controller in afterEach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had it before but does not make sense of it with these changes. Mostly it's used for sleep and peer connection, if any of those hangs up the test will already timeout.
I see only way to is to give it a try and observe CI over few days, so we have real analysis of it. There is no way to produce/control the load on CI server on our own. |
|
🎉 This PR is included in v1.30.0 🎉 |
**Motivation** - make e2e tests stable - peers get disconnected in e2e tests **Description** - I was not able to run `finalizeSync.test.ts` e2e tests in `mkeil/refactor-block-input-on-unstable` until I found this option added since #7762 - sometimes I found same issue with `unknownBlockSync.test.ts` e2e test, suppose it will help that test too since it uses same utils Co-authored-by: Tuyen Nguyen <[email protected]>
Motivation
Make our tests more stable on CI.
Description
Fix following flaky tests
packages/beacon-node/test/e2e/network/reqresp.test.tsPartially Closes #6358
Steps to test or reproduce