Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Enhancement: Selenium Grid Capability #1123
Enhancement: Selenium Grid Capability #1123
Changes from all commits
fda0b3a
c3bf916
0ba03f0
e46d973
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
5min is the default of Selenium Grid. Can we make it configurable?
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.
you mean to say can we configure the default idle time of selenium . I do not know I tried it once to increase it to 10 mins but was not successful. If you can help me with this.
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.
You can configure the default timeout on the server side of selenium grid, so it would be useful to have a config option in SC to adjust it accordingly if it is changed on the grid side.
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.
grid.timeout.minutes this is the configuration I am planning to give
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.
Why do we clear the full queue? My impression was, that the queue is used to hold
Driver
instances, so we should just remove that specifc driver or did I understand something wrong?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.
Say when the crawler is in a idle mode and has not been running any crawls, the drivers would be sitting idle and would have lost the session .
To check every driver session id would be a costly affair. So its better if we clear the queue and again add it from the grid which are active and available in the grid.
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.
Here two sets of list are getting handled one the grid handles and the other queue we handle per worker. So its better to clear out the queue and try adding it again from the available nodes from the grid.
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.
If this is initalized on the same JVM multiple times, we will override the current driver queue. Is this field required to be
static
at all? I would assume, that the grid can deal with multiple clients?If it needs to be
static
, we should prevent multiple initialization of it (but leads to the same thing, if we are working on multiple JVMs).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.
@rzo1 please suggest, shall I instantiate the blocking queue using singleton pattern?
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.
Does it need to be
static
?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.
Maybe we can handle a potential exception from
getStatusStream()
inside this method instead of relying on an exception-based code flow? For example just returnnull
or an empty list and deal with it on the caller side?`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.
I am wondering, if we should make this async and use a latch here to prevent active waiting? In any case, we might want to add some sort of wait here to prevent hammering the grid?
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.
Can be removed as it is never called and driver is set via constructor.
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.
@rzo1 Since it is just a pojo class can I move it to some other place, can you please suggest a package where should I move this file. I want to avoid using the new operator inside seleniumgridimpl and directly use the Holder.java as model
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.
Feel free to make a suggestions.