-
Notifications
You must be signed in to change notification settings - Fork 63
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
TTL for WS Connections #1011
TTL for WS Connections #1011
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1011 +/- ##
=======================================
Coverage 74.63% 74.63%
=======================================
Files 30 30
Lines 2030 2030
Branches 386 386
=======================================
Hits 1515 1515
Misses 410 410
Partials 105 105 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
Missing documentation of new config value
81d3a26
to
6e444a2
Compare
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, almost there.
Question on a test and decrement logic
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, with comment suggestion for test clarity
…too long. Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
WS_MAX_CONNECTION_TTL and other WS configuration values. Addressing some suggestions from PR reviews. Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
… fail, avoided test failed by moving my test above the last one Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
…connection is created, instead than when the webSocketServer is instantiated, this allows for better testability. Also added comments to tests for better readability. Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
d68fd46
to
f006d81
Compare
@@ -104,6 +106,11 @@ describe('@web-socket Acceptance Tests', async function() { | |||
wsProvider.destroy(); | |||
}); | |||
|
|||
this.afterAll(async () => { | |||
// Return ENV variables to their original values | |||
process.env.WS_MAX_CONNECTION_TTL = '300000'; |
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: if this is supposed to be the original value you should probably cache it first.
The current logic will require this value get updates should the default WS_MAX_CONNECTION_TTL
ever change.
…f initial default Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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
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
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
Description:
Adding TTL to websocket connections to avoid keeping connections for too long.
Related issue(s):
Fixes #986
Notes for reviewer:
Checklist