-
Notifications
You must be signed in to change notification settings - Fork 575
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
Add remote read timeout as configurable parameter #1936
Add remote read timeout as configurable parameter #1936
Conversation
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
@rodion-goritskov We intentionally didn't introduce a config parameter because it's rarely needed. @BeforeAll
void setupWebdriver() {
HttpClientTimeouts.defaultReadTimeout = Duration.ofSeconds(180);
} |
Yeah, I understand it could be overridden this way - but I thought about following cases:
|
@rodion-goritskov Well, yes, probably it makes sense. NB! But isn't setting a LONG timeout a dirty workaround, not a real solution? Why don't you want to just configure proper number of Selenium Grid executors and parallel tests? |
Well, mostly there are three cases:
These all are mostly "sometimes" cases, but with our current number of tests stability is much more important than speed. P.S. We are now in process of Selenium Grid 4 adoption, but it will take some time |
Are you sure this change really allows this?
I am not sure. Look, instance of P.S. What you are describing looks like a disaster. Why not use as many browsers as really needed? If you have multiple teams which all need to run tests - why not use as many Moon instances / Kubernetes notes / whatever else is needed to run tests comfortably? You are wasting time of your multiple teams - isn't it a huge waster of resources? |
+1 |
@@ -13,5 +13,5 @@ | |||
*/ | |||
@ParametersAreNonnullByDefault | |||
public class HttpClientTimeouts { |
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.
It seems will be better get rid of this class at all and use default from global config.
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.
We cannot do it because we still need to use HttpClientTimeouts.defaultReadTimeout
when running browser locally (in class SelenideNettyClientFactory
).
But yes, we could move field defaultReadTimeout
from HttpClientTimeouts
into SelenideNettyClientFactory
and remove class HttpClientTimeouts
.
LGTM. One minor question\comment |
Proposed changes
I have quiet a small number of executors in my Selenium Grid (and in Browserstack too) and long running tests, so sometimes tests need to wait for the new browser session for more than 90 seconds.
In this pull-request I add new variable remoteReadTimeout to configuration with default value of 90000 ms, so I can configure read timeout from properties or command-line
Read timeout for local browsers is still 90 seconds and is not configurable (it seems reasonable).
Checklist
gradlew check chrome_headless firefox_headless
command