[grid][java]: session-timeout set connection timeout in RemoteNode
User description
Thanks for contributing to Selenium! A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines. Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Try something for https://github.com/SeleniumHQ/selenium/issues/13340
session-timeout is an attribute of all node types and can get in part of NodeStatus
Use session-timeout to set connection timeout and read timeout for HttpClient config in RemoteNode
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] I have read the contributing document.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Type
enhancement
Description
- Added
sessionTimeouttoNodeStatusand updated JSON handling. - Enhanced various node types and distributor classes to include and manage
sessionTimeout. - Updated tests across multiple classes to incorporate
sessionTimeoutin node configurations and assertions.
Changes walkthrough
| Relevant files | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 9 files
| ||||||||||||||||||
| Tests | 4 files
|
✨ PR-Agent usage: Comment
/helpon the PR to get a list of all available PR-Agent tools and their descriptions
@diemol, can you also review this one?
PR Description updated to latest commit (https://github.com/SeleniumHQ/selenium/commit/63872ee43451ad557dcf21033971aec25fd1f5af)
- [ ] Copy walkthrough table to "Files Changed" Tab
PR Review
(Review updated until commit https://github.com/SeleniumHQ/selenium/commit/2eac37a01de25b9762b7e0fde4d9780bc06ca69c)
| ⏱️ Estimated effort to review [1-5] |
3, because the PR involves multiple changes across various files, including core classes like Node, RemoteNode, and NodeStatus. The changes are not overly complex but require a thorough understanding of the existing architecture and the implications of adding session timeout settings. |
| 🧪 Relevant tests |
Yes |
| 🔍 Possible issues |
Possible Bug: Ensure that all constructors and methods that now include |
|
Performance Concern: Adding session timeout to the HTTP client configuration could potentially impact performance. It's important to test how these changes affect the system's responsiveness and timeout behavior under different network conditions. | |
| 🔒 Security concerns |
No |
✨ Review tool usage guide:
Overview:
The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.
The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
- When commenting, to edit configurations related to the review tool (
pr_reviewersection), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
- With a configuration file, use the following template:
[pr_reviewer]
some_config1=...
some_config2=...
See the review usage page for a comprehensive guide on using this tool.
PR Code Suggestions
| Category | Suggestions |
| Enhancement |
Add validation to ensure the session timeout is not negative or zero.The constructor java/src/org/openqa/selenium/grid/node/Node.java [133]
|
| Performance |
Modify the
|
| Maintainability |
Add logging for the session timeout value in the
|
| Bug |
Ensure the session timeout is non-null before passing to the superclass constructor in
|
| Best practice |
Validate the
|
✨ Improve tool usage guide:
Overview:
The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
- When commenting, to edit configurations related to the improve tool (
pr_code_suggestionssection), use the following template:
/improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
- With a configuration file, use the following template:
[pr_code_suggestions]
some_config1=...
some_config2=...
See the improve usage page for a comprehensive guide on using this tool.
PR Description updated to latest commit (https://github.com/SeleniumHQ/selenium/commit/2eac37a01de25b9762b7e0fde4d9780bc06ca69c)
- [ ] Copy walkthrough table to "Files Changed" Tab
Persistent review updated to latest commit https://github.com/SeleniumHQ/selenium/commit/2eac37a01de25b9762b7e0fde4d9780bc06ca69c
PR Code Suggestions
| Category | Suggestions | |
| Bug |
Add null check for
| |
| Enhancement |
Add a fallback for
| |
| Best practice |
Ensure
| |
| Maintainability |
Log a warning if
| |
Refactor
|
✨ Improve tool usage guide:
Overview:
The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
- When commenting, to edit configurations related to the improve tool (
pr_code_suggestionssection), use the following template:
/improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
- With a configuration file, use the following template:
[pr_code_suggestions]
some_config1=...
some_config2=...
See the improve usage page for a comprehensive guide on using this tool.
@VietND96 can you please update your fork?
@diemol, I updated the fork. Also, I found that the test is used to define a CustomNode, and it can be added. So, I updated the CustomNode with attr sessionTimeout, which can be set when creating. In the test, it asserts that getSessionTimeout() is working. Check if the update for the test makes sense.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 58.70%. Comparing base (
fe2edbd) to head (3548225). Report is 2 commits behind head on trunk.
:exclamation: Current head 3548225 differs from pull request most recent head e199835. Consider uploading reports for the commit e199835 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## trunk #13854 +/- ##
=======================================
Coverage 58.70% 58.70%
=======================================
Files 86 86
Lines 5296 5296
Branches 226 226
=======================================
Hits 3109 3109
Misses 1961 1961
Partials 226 226
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.