Port 0 is reserved and invalid for client TCP connections, but NettyClientBuilder.build() currently allows it through (it rejects only negative ports and values above 65535). The lower bound should be tightened to 1.
Four builder-based tests in the JDBC module also have a latent bug where .withPort() is never called, so the port field defaults to 0. These fail once the lower bound is tightened:
ConnectionTest.testGetBasicClientNoAuthShouldOpenConnection
ConnectionTlsTest.testGetNonAuthenticatedEncryptedClientNoAuth
ConnectionTlsRootCertsTest.testGetNonAuthenticatedEncryptedClientNoAuth
ConnectionMutualTlsTest.testGetNonAuthenticatedEncryptedClientNoAuth
Each needs .withPort(FLIGHT_SERVER_TEST_EXTENSION.getPort()) added to its builder call.
This was deferred from #1027 to keep that PR small — see #1027 (comment).
Port 0 is reserved and invalid for client TCP connections, but
NettyClientBuilder.build()currently allows it through (it rejects only negative ports and values above 65535). The lower bound should be tightened to 1.Four builder-based tests in the JDBC module also have a latent bug where
.withPort()is never called, so the port field defaults to 0. These fail once the lower bound is tightened:ConnectionTest.testGetBasicClientNoAuthShouldOpenConnectionConnectionTlsTest.testGetNonAuthenticatedEncryptedClientNoAuthConnectionTlsRootCertsTest.testGetNonAuthenticatedEncryptedClientNoAuthConnectionMutualTlsTest.testGetNonAuthenticatedEncryptedClientNoAuthEach needs
.withPort(FLIGHT_SERVER_TEST_EXTENSION.getPort())added to its builder call.This was deferred from #1027 to keep that PR small — see #1027 (comment).