pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: reda-alaoui (@reda-alaoui) <noreply+reda-alaoui@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #3964: feat: add tcpKeepAliveCount, tcpKeepAliveIdle and tcpKeepAliveInterval connection properties
Date: Sat, 17 Oct 2026 18:58:34 +0000
Message-ID: <gh-pgjdbc-pgjdbc-3964-rc4304040319@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-3964-rc3972654787@github.com>
References: <gh-pgjdbc-pgjdbc-3964@github.com>
	<gh-pgjdbc-pgjdbc-3964-rc3972654787@github.com>

(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConnectionTest.java)

Done in e269ec92.

1. Every keep-alive check now runs once per option (`@ParameterizedTest` over the three) behind `assumeTrue(option.isSupportedBy(socket), "the JDK or the operating system does not support <option>")`, gated on `Socket.supportedOptions()` itself, so a Java 8 run reports skips with a reason, and a platform with partial support still checks the options it has.
2. The oracle is `TcpKeepProbeOptionOracle` in `org.postgresql.test.util`, which reads and writes `jdk.net.ExtendedSocketOptions` through `Socket.getOption`/`setOption` reflectively. A new server-free `ExtendedSocketOptionAccessorImplTest` (loopback `ServerSocket`) checks the accessor against it in both directions, so a swapped mapping fails whichever side it is on.
3. Missing cases: an option the socket does not support (a `Socket` subclass reporting no supported options) is ignored with one exact `WARNING` per option, in the new `TcpKeepSettingsTest`; negative and non-numeric values are rejected with their exact message, for each of the three properties; `setInteger(props, null)` removes the key. `tcpKeepAlive=false`, zero and `Integer.MAX_VALUE` were already covered. The JDK 8 refusal no longer exists: since e3fe21d3 the options are ignored with a warning there, and the ignore test covers that path.


view thread (85+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-3964-rc4304040319@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-3964-rc4304040319@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox