-
Notifications
You must be signed in to change notification settings - Fork 75
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
fix: removed ping method in WS server #2394
fix: removed ping method in WS server #2394
Conversation
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.
There is an error linting the charts.
6afbb25
to
d04af53
Compare
Signed-off-by: Logan Nguyen <[email protected]>
d04af53
to
27351ef
Compare
Signed-off-by: Logan Nguyen <[email protected]>
Quality Gate passedIssues Measures |
describe('Subscriptions for newHeads', async function () { | ||
it('should subscribe to newHeads, include transactions true, and receive a valid JSON RPC response', (done) => { | ||
process.env.WS_NEW_HEADS_ENABLED = 'true'; | ||
const webSocket = new WebSocket(WS_RELAY_URL); | ||
const subscriptionId = 1; |
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.
nit: We can extract the common setup logic in beforeEach
:
describe('Subscriptions for newHeads', async function () {
+ let webSocket: WebSocket;
+ const subscriptionId = 1;
+
+ beforeEach(() => {
+ process.env.WS_NEW_HEADS_ENABLED = 'true';
+. webSocket = new WebSocket(WS_RELAY_URL);
+ });
it('should subscribe to newHeads, include transactions true, and receive a valid JSON RPC response', (done) => {
- process.env.WS_NEW_HEADS_ENABLED = 'true';
- const webSocket = new WebSocket(WS_RELAY_URL);
- const subscriptionId = 1;
...
});
it('should subscribe to newHeads, without the "include transactions", and receive a valid JSON RPC response', (done) => {
- process.env.WS_NEW_HEADS_ENABLED = 'true';
- const webSocket = new WebSocket(WS_RELAY_URL);
- const subscriptionId = 1;
...
});
it('should subscribe to newHeads, with "include transactions false", and receive a valid JSON RPC response', (done) => {
- process.env.WS_NEW_HEADS_ENABLED = 'true';
- const webSocket = new WebSocket(WS_RELAY_URL);
- const subscriptionId = 1;
...
});
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.
Nice suggestion thanks a lot!
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.
LG, @victor-yanev comment is a good improvement.
But more importantly, have we been able to resolve the issue that is closing the connection after 100 seconds? we decided to support 5 minutes right?
Should we want to remove this ping feature before being able to resolve the issue on the infrastructure?
Description:
This PR removes the ping method in the WS server to stop the server from repeatitively sending null responses back to client
misc: renamed one of the test case which was incorrect
Related issue(s):
Fixes #2359
Notes for reviewer:
Checklist