-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Use MaxAttemptsReachedOnReconnectingError
similar to v1.x
#5894
Use MaxAttemptsReachedOnReconnectingError
similar to v1.x
#5894
Conversation
…connection + rename `_providerOptions` to `_socketOptions`
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded
Removed No assets were removed Bigger
Smaller
Unchanged
|
Deploying with
|
Latest commit: |
84029a2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://d106f270.web3-js-docs.pages.dev |
Branch Preview URL: | https://feature-5889-keep-emitting-t.web3-js-docs.pages.dev |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #5894 +/- ##
==========================================
+ Coverage 80.85% 80.86% +0.01%
==========================================
Files 136 136
Lines 5901 5900 -1
Branches 1537 1537
==========================================
Hits 4771 4771
+ Misses 1130 1129 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ot-passed-to-the-constructor-of-the-underlying-socket-object' into feature/5889/keep-emitting-the-error-as-an-object-for-maximum-number-of-reconnect-attempts-reached
11e454f
to
9e1d763
Compare
MaxAttemptsReachedOnReconnectingError
similar to v1.xMaxAttemptsReachedOnReconnectingError
similar to v1.x
MaxAttemptsReachedOnReconnectingError
similar to v1.xMaxAttemptsReachedOnReconnectingError
similar to v1.x
…ject-for-maximum-number-of-reconnect-attempts-reached
…aximum-number-of-reconnect-attempts-reached' of https://github.com/ChainSafe/web3.js into feature/5889/keep-emitting-the-error-as-an-object-for-maximum-number-of-reconnect-attempts-reached
88205fc
to
bc74b2b
Compare
const errorMsg = `Max connection attempts exceeded (${this._reconnectOptions.maxAttempts})`; | ||
this._eventEmitter.emit('error', errorMsg); | ||
this._eventEmitter.emit( | ||
'error', |
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.
https://github.com/web3/web3.js/runs/11848321915 codecov seems to be failing, otherwise PR LGTM
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.
Thanks @luu-alex ,
Actually, this is tested twice inside web3-providers-ws and web3-providers-ipc. But CodeCov does not check across packages. So, I think it is safe to ignore it. Or what do you think?
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.
couldn't we have a dedicated test in web3-utils
for that?
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.
Actually, we can. But it will require a complex scenario that is already tested twice with IpcProvider and WebSocketProvider. So, writing the test will be just time-consuming, I think 😊 .
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.
Actually, this is tested twice inside web3-providers-ws and web3-providers-ipc. But CodeCov does not check across packages
currently codecov is only checking unit-testing inside packages and not counting any coverage for tests across packages ( integration tests )
…ject-for-maximum-number-of-reconnect-attempts-reached
const errorMsg = `Max connection attempts exceeded (${this._reconnectOptions.maxAttempts})`; | ||
this._eventEmitter.emit('error', errorMsg); | ||
this._eventEmitter.emit( | ||
'error', |
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.
couldn't we have a dedicated test in web3-utils
for that?
…ject-for-maximum-number-of-reconnect-attempts-reached
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.
lgtm, except change request above.
Description
Fixes #5889
Type of change
Checklist for 1.x:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.