The grid actually enforces a timeout with regard to hanging browsers,
and I think my (current) conclusion is that this timeout is under all
circumstances incorrect
and should be removed. The grid should only terminate sessions when
the client decides to die.
Architecturally, it seems to me like the timeout should be in the browser,
implying that under normal operating conditions, no-one else needs to have
timeout handling. As a secondary solution, the node (selenium-server) can
enforce a timeout.
But not the grid. That's just asking for trouble.
WDYT ?
Kristian
Kristian
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To post to this group, send email to selenium-...@googlegroups.com.
To unsubscribe from this group, send email to selenium-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-developers?hl=en.
I've been trying to come to grips with what/how this
should actually be done, and this is as far as I've gotten:
The well-behaved webdriver client is expected to
have a try/finally relationship to the quit method:
WebDriver driver;
try {
... run test ...
} finally {
driver.quit();
}
This is normally enforced by the test framework,
where (at least) JUnit ensures this behaviour wrt
@After and @AfterClass.
The way I understand this; if the selenium-server decides to
time-out a get operation, this should be associated with the
selenium-server-session ("isTimedOut"). When the subsequent
call to "quit" arrives, the server must kill the process (at the os-level); no
mr nice guy calling "quit" since the state of the browser is undefined.
As of today, if the browser hangs (on get, javascript or FUD), it eventually
hits the 3 hour max socket timeout I added some versions ago. We frequently
see that happening on our CI.
I am not sure users without grid/server actually *need* any
timeout in their stack, though I'm sure that's just my short-sightedness.
I think this stuff is pretty hard to get right...
Kristian
2012/2/18 François Reynaud <francois...@gmail.com>:
Not calling quit or the client simply dying can and should be handled
on the grid with the current clean up thread mechanism. That's a
controlled, non-reentrant thing; the grid only deals with client death
and can do all the current stuff when the client has decided to die.
The thing is, grid should not generate or act on timeouts for any
request that is being forwarded to the node (which it currently does).
In this case, acting on timeout is the responsibility of the node (or
even the browser, it's a SEP as seen from the grid). Furthermore, the
node will generate a fault that'll just pass straight through the grid
and on to the client, and it's the client's responsibility to call
quit. (This is where the try/finally bit comes in which most java test
frameworks just do anyway). If the client decides to puke on the
exception and not call quit, it's just the same scenario as client
dying above.
> As of today, if the browser hangs (on get, javascript or FUD), it eventually
> hits the 3 hour max socket timeout I added some versions ago. We frequently
> see that happening on our CI.
Any idea why? I've very rarely if ever seen this...
I've just stopped running the tests from 3am to 6am to avoid the
whole problem;
unsure if that is a can of worms we'd ever want to open ;)
Kristian
2012/2/19 Daniel Wagner-Hall <dawa...@gmail.com>:
This is the point where my eyes go all glazy and I seem to stare
right through you. I hope Simon will correct me on this, but
after a timeout you cannot really safely do any of those things.
If you just had an ordinary error, fine, but after timeout not really.
Even calling "quit" is technically illegal after a timeout, which is
why I suggested that the selenium server kill the process on quit.
Someone please tell me I'm wrong ;)
Kristian
K
2012/2/19 Kristian Rosenvold <kristian....@gmail.com>:
I think you misunderstood. I'm not wanting to do any of these things after a timeout, but wanted to let you know that my framework (and therefore potentially others) may still try to. I can modify it if needed, but ideally these calls would just fail such as they currently do if a session is no longer available.
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-developers/-/VLCgBUTQjM0J.