On Mar 29, 2010, at 12:31pm, KARR, DAVID (ATTSI) wrote:
I'm trying to test that my framework code deals appropriately with a
connection timeout error. I'm connecting to another host on our
intranet, and I've set the "connectionManagerTimeout" to "1" (1 ms).
This does not fail. Is that surprising? I've also tested the read
timeout, and that appears to work fine. Is there something simple I
can
do that can force a connection timeout?
I don't know what others do, but I run an embedded Jetty server to
test this type of support.
HttpServer server = new HttpServer();
server.addListener(":" + port);
HttpContext context = server.getContext("/");
context.addHandler(handler);
server.start();
Where <handler> is something that extends AbstractHttpHandler
So then it's pretty easy to do things like have a handler that just
hangs.
-- Ken
--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c w e b m i n i n g