[9] RFR: 8156710: HttpTimeoutException should be thrown if server doesn't respond
Michael McMahon
michael.x.mcmahon at oracle.com
Fri May 13 10:03:24 UTC 2016
Artem,
Thanks for doing this. Eventually, the fix will have to be updated to
reset the stream, but all the required functionality for that isn't
there yet.
Also, I think a test which uses the test http2 server will be needed.
But, for now, the fix looks fine.
- Michael.
On 12/05/16 22:10, Artem Smotrakov wrote:
> Hello,
>
> Please review this for 9.
>
> Stream.getResponse() method can hang because it calls join() method
> without any timeout. It would be better if it took into account a
> timeout value specified for a connection, and threw
> HttpTimeoutException if timeout was reached.
>
> The patch updates Stream.getResponse() method to use
> CompletableFuture.get() method with timeout if a timeout value was
> specified for HTTPRequest.
>
> Timeout.java test starts a TLS server which just reads incoming data,
> but doesn't reply anything. The client sets a timeout with
> HTTPRequestBuilder.Builder.timeout() method, and then expects
> HttpTimeoutException.
>
> The test initializes JSSE with standard way by system properties. RSA
> keys are located in keystore.p12 which can be re-used by other tests.
> The keys were created by the following command:
>
> keytool -genkey -alias rsa2048keypair -keystore keystore.p12
> -storepass password -keypass password -validity 3650 -keysize 2048
> -dname "CN=Test RSA 2048 key"
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8156710
> Webrev: http://cr.openjdk.java.net/~asmotrak/8156710/webrev.01/
>
> Artem
More information about the net-dev
mailing list