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

limit pageLoadTimeout driver timeout by idleTimeout #24

Open
vdelendik opened this issue Jun 9, 2022 · 1 comment
Open

limit pageLoadTimeout driver timeout by idleTimeout #24

vdelendik opened this issue Jun 9, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@vdelendik
Copy link
Contributor

We don't provide any pageLoadTimeout value and selenium set by default 300s into it. At the same time most of the hub providers including zebrunner might limit inactive session by idleTimeout capability.
So if pageLoadTimeout is greater then idleTimeout our session might be dropped by the hub and we should proceed with catching driver connection refused etc.

So let's experiment and update pageLoadTimeout limiting it by idleTimeout if any or 300s if not.
Expected benefits:

  1. all actions will be timed out n client side with proper and clear error messages
  2. we could manage this value on the fly per action (open url or making screenshot) and return on finally to default state
  3. we might keep driver session valid and continue with other steps even if screenshooting failed for example
@vdelendik vdelendik added the enhancement New feature or request label Jun 9, 2022
@vdelendik
Copy link
Contributor Author

so far we can't override this capability as Zebrunner Selenium Grid can't start a session:

2022-06-09 12:42:38 Messager [TestNG-methods-62-90] [ERROR] TEST [GSM arena web tests - testModelSpecs [InvCount=0201]] FAILED at [12:42:38 2022-06-09] - Failed to process capabilities. 
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'a6942e7dad79', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.13.0-1025-aws', java.version: '11.0.15'
Driver info: driver.version: RemoteWebDriver
remote stacktrace: 

jdk.internal.reflect.GeneratedConstructorAccessor33.newInstance(Unknown Source)
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
com.qaprosoft.carina.core.foundation.webdriver.listener.EventFiringSeleniumCommandExecutor.execute(EventFiringSeleniumCommandExecutor.java:51)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
org.openqa.selenium.remote.RemoteWebDriver.startSession$original$SWxUnz4H(RemoteWebDriver.java:213)
org.openqa.selenium.remote.RemoteWebDriver.startSession$original$SWxUnz4H$accessor$0FKHmc3v(RemoteWebDriver.java)
org.openqa.selenium.remote.RemoteWebDriver$auxiliary$VoSCIGf1.run(Unknown Source)
com.zebrunner.agent.core.webdriver.StartSessionInterceptor.onSessionStart(StartSessionInterceptor.java:37)
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java)
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory.create(DesktopFactory.java:74)
com.qaprosoft.carina.core.foundation.webdriver.core.factory.DriverFactory.create(DriverFactory.java:79)
com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.createDriver(IDriverPool.java:406)
com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:129)
com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:85)
com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:72)
com.qaprosoft.carina.demo.WebSampleTest.testModelSpecs(WebSampleTest.java:51)
jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:673)
org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58)
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)

https://vd2.zebrunner.org/projects/DEF/test-runs/1461

let's continue investigation later. make sure to adjust timeout for screenshoting as well

@akamarouski akamarouski transferred this issue from zebrunner/carina Mar 15, 2023
@akamarouski akamarouski added this to the 1.3.x milestone Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants