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

[grid] Remove old Grid tests since features exist in current Grid #9400

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

pujagani
Copy link
Contributor

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

Remove old Grid tests since features exist in current Grid

Motivation and Context

LoadBalancedTest
Feature: Incoming test should be load-balanced among all the Nodes in the Grid

Details:
In Grid 4 the Distributor identifies the Node for new incoming session request. This Node selection is done here: https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/distributor/selector/DefaultSlotSelectorTest.java
While selecting the Node, the Node’s load is also considered.
Test: https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/distributor/DistributorTest.java#L496

NewRequestCrashesDuringNewSessionTest
Feature: New session creation error should not lead to an inconsistent state in the Grid

Details:
If any error happens while creating a new session request, the error is propagated back to the Distributor and depending on the error, the request is either retried or rejected. In case the request is retried, it will be retried up to a certain timelimit then rejected. Similarly, if the request sits in the new session request queue and the Grid is facing any issue in polling the session, the timed-out requests are removed from the queue.

Tests:
https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/router/SessionQueueGridTest.java
https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/router/NewSessionCreationTest.java#L158

RemoteProxySlowSetup
Feature: Multiple time if the same node is registered, then it is counted as one.

Grid 3 :
Any new incoming node registers itself with the Hub. If two same nodes (same configuration) register to the Hub, only one node registers itself.

Grid 4 :
Same as Grid 3

Test:
https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/distributor/DistributorTest.java#L480

SessionTimesoutTest
Feature: Remove any inactive session after a configured time period. Poll all nodes at regular intervals (configurable) and remove inactive Nodes.

Grid 3 :
timeout - Configurable flag for removing inactive session. If the session is inactive for more than that time, the session is removed from the Grid and frees up the slot.
cleanUpCycle - Hub polls all the Node at regular interval and removes inactive Node.

Grid 4 :
Same as Grid 3
session - timeout - Configurable flag for removing inactive session. If the session is inactive for more than that time, the session is removed from the Grid and frees up the slot.
heartBeat-period - Hub polls all the Node at regular interval and removes inactive Node.

SmokeTest

Grid 3 :
Test to check end to end functionality of the Grid for 10 tests.

Grid 4 :
Covered in
https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/router/EndToEndTest.java

https://github.com/SeleniumHQ/selenium/blob/trunk/java/server/test/org/openqa/selenium/grid/router/StressTest.java

Since the features described above are present in Grid 4. It is safe to remove the tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • 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.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @pujagani!

@diemol diemol merged commit 8cabfbf into SeleniumHQ:trunk Apr 21, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants