On Tue, 22 Sep 2026 09:20:57 GMT, Arno Zeller <[email protected]> wrote:

> Adjust the THRESHOLD constant to use _adjustTimeout_() so it scales 
> appropriately with the test environment's timeout factor, consistent with 
> other tests such as TcpTimeout.java. Reduced the default value from 3000 ms 
> to 2000 ms.
> 
> The value is additionally capped at 9 seconds to ensure it stays well below 
> the full exponential backoff retry cycle (1 + 2 + 4 + 8 = 15 s), preserving 
> the test's intent of verifying that an ICMP Port Unreachable response causes 
> a quick failure rather than waiting through all retries.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Good improvement. I made a few wording suggestions for the comment.

test/jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java line 50:

> 48: 
> 49:     // Threshold in ms for elapsed time of request failed. Normally, it 
> should
> 50:     // be very quick, but consider to different platform and test machine

Suggestion:

    // be very quick, but considering different platform and test machine

test/jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java line 51:

> 49:     // Threshold in ms for elapsed time of request failed. Normally, it 
> should
> 50:     // be very quick, but consider to different platform and test machine
> 51:     // performance, here we define 2000 ms as threshold which acceptable 
> for

Suggestion:

    // performance, here we define 2000 ms as a threshold which is acceptable 
for

test/jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java line 52:

> 50:     // be very quick, but consider to different platform and test machine
> 51:     // performance, here we define 2000 ms as threshold which acceptable 
> for
> 52:     // this test. Capped at 9s to stay well below the full exponential 
> backoff

Suggestion:

    // this test. Capped at 9s to stay well below the full DNS exponential 
backoff

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

PR Review: https://git.openjdk.org/jdk/pull/33000#pullrequestreview-5278974898
PR Review Comment: https://git.openjdk.org/jdk/pull/33000#discussion_r4072367100
PR Review Comment: https://git.openjdk.org/jdk/pull/33000#discussion_r4072370915
PR Review Comment: https://git.openjdk.org/jdk/pull/33000#discussion_r4072377300

Reply via email to