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

flakey protocol test beforeEach fix #4651

Merged
merged 6 commits into from
Aug 11, 2020
Merged

flakey protocol test beforeEach fix #4651

merged 6 commits into from
Aug 11, 2020

Conversation

alecps
Copy link
Contributor

@alecps alecps commented Aug 8, 2020

Description

Other changes

None

Tested

To see that this works, search logs for "retry" in https://circleci.com/gh/celo-org/celo-monorepo/248635

Related issues

Backwards compatibility

Not applicable

@alecps alecps marked this pull request as draft August 8, 2020 02:03
@alecps alecps force-pushed the alecps/protocol-tests branch from 50bef0b to 6b3570c Compare August 8, 2020 23:12
@alecps alecps marked this pull request as ready for review August 8, 2020 23:34
@alecps alecps requested review from nambrot, asaj and gastonponti August 8, 2020 23:36
@alecps alecps added the automerge Have PR merge automatically when checks pass label Aug 8, 2020
@alecps alecps changed the title flakey protocol beforeEach triage flakey protocol test beforeEach fix Aug 9, 2020
@alecps alecps requested review from nambrot and removed request for i1skn, jeanregisser and jmrossy August 10, 2020 17:03
@alecps alecps force-pushed the alecps/protocol-tests branch from 51a7d16 to a113730 Compare August 10, 2020 18:23
@mergify mergify bot merged commit 34ce248 into master Aug 11, 2020
@mergify mergify bot deleted the alecps/protocol-tests branch August 11, 2020 08:49
ewilz pushed a commit to ewilz/celo-monorepo that referenced this pull request Sep 29, 2020
### Description

- This change should fix the flakey `error: Invalid JSON RPC response: ""` error that we often see in the protocol test beforeEach hooks (particularly those for the Attestations contract). 

- Implements a custom beforeEachWithRetries hook for the protocol tests package that will optionally retry beforeEach hooks and add sleep in between retries. This is necessary to avoid flakiness that seems to be caused by port exhaustion in CI and a mishandling of the error by web3. (See web3/web3.js#3425 and web3/web3.js#926).

- I've only added `beforeEachWithRetries` to the Attestations tests because this error appears there the most. We can add it elsewhere in the future as needed.

### Other changes

None

### Tested

To see that this works, search logs for "retry" in https://circleci.com/gh/celo-org/celo-monorepo/248635

### Related issues

- Fixes celo-org#4570

### Backwards compatibility

Not applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
3 participants