Ken - Correct me if I'm wrong, but the mechanism you provided would
test the read timeout rather than a connection timeout.

David - Sub-1ms latency on your intranet is normal (providing the
hosts are within the same location). If you're just looking to test
that the timeout is hit, then I'd try connecting to a host that does
*not* exist (i.e. pick an IP address in your network that does not
ping). This will trigger a connection timeout, as no response will be
received. Alternatively, if you have a large regional network, try
connecting to a host in another city/country.

Thanks,

Sam


On 29 March 2010 20:53, Ken Krugler <[email protected]> wrote:
>
> 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
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to