I have problems with Htmlunit, I turned off JavaScript and set a timeout to 10000 before calling getpage, I expected an exception after a timeout, but htmlunit waits forever.
After some searching, I realized that someone in 2009 had the same problem ( Connection timeout does not work ), he complained about โConnection timeout does not workโ and some values โโin the timeout did not work, but before so far in 2011 has not received any response.
Someone here asked a question about which exception was thrown, but I think that he does not always throw it. I cannot get a response from Apache HttpClient setTimeout . You can see how another person asks about a timeout stop in Terminate or Stop HtmlUnit .
You can see how crazy he is if you try:
milisecReqTimeout = 10; while(true) { _webclient.setTimeout(milisecReqTimeout); milisecReqTimeout = milisecReqTimeout + 10; _htmlpage = _webclient.getPage(url); }
java timeout htmlunit
metoo
source share