RFR: 8301214: Adjust handshakeTimeout value in test HandshakeTimeout.java after 8189338

Vyom Tewari vtewari at openjdk.org
Mon Jan 30 12:57:16 UTC 2023


On Mon, 30 Jan 2023 11:06:05 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> Please review this patch that reduces the socket timeout used in HandshakeTimeout test to its minimum value of 1 millisecond.
> 
> This change makes the test complete 10 seconds faster; before this change it took 5 seconds for the handshake to timeout, and the test attempts 2 handshakes.
> 
> The change also makes the test more likely to pass when it has to compete with other tests for CPU time.

test/jdk/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java line 59:

> 57:     public static void main(String[] args) throws Exception {
> 58: 
> 59:         System.setProperty("sun.rmi.transport.tcp.handshakeTimeout", "1");

I can see that this test uses "TIMEOUT" down in test 
/*
         * Wait for call attempt to finished, and analyze result.
         */
        t.join(TIMEOUT);

i will suggest you to reduce the "TIMEOUT"  constant instead of hard coding it to "1" second.

-------------

PR: https://git.openjdk.org/jdk/pull/12292


More information about the core-libs-dev mailing list