[Httpunit-develop] Timeout
Brought to you by:
russgold
From: Sean L. <Se...@in...> - 2004-02-26 21:54:14
|
I realize the FAQ about timeouts says this: How does HttpUnit handle request timeouts? Badly. Unfortunately, through JDK 1.3, HttpURLConnection (used by HttpUnit to access web servers) has no support for timeouts. Supposedly, this is changed in JDK 1.4, but HttpUnit does not support the new feature as yet. Form Handling Problems However, I am using 1.4, and if you look here at this url (http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html) they have these parms: sun.net.client.defaultConnectTimeout (default: -1) sun.net.client.defaultReadTimeout (default: -1) These properties specify the default connect and read timeout (resp.) for the protocol handler used by java.net.URLConnection. sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example for http connections it is the timeout when establishing the connection to the http server. For ftp connection it is the timeout when establishing the connection to ftp servers. sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from input stream when a connection is established to a resource. Has anyone set these and got the results they expect? I'm trying to test this, but either it's being ignored, or I'm trying to cause a timeout in an incorrect way. It comes back with an error within a second. I'm just trying to connect to my own box that has no web server running. Thanks in advance, -- Sean LeBlanc Software Developer insightamerica "Those who do not understand Unix are condemned to reinvent it, poorly." --Henry Spencer e-Mail Notice: This communication may contain sensitive information. If you are not the intended recipient, or believe that you have received this communication in error, do not print, copy, retransmit, disseminate, or otherwise use the information contained herein for any purpose. Please alert the sender that you have received this message in error and delete the copy that you received. |