You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
socketTimeout alone in a JDBC URL throws NumberFormatException #196
A JDBC URL with only socketTimeout throws NumberFormatException from DriverManager. The parser enters the timeout branch but reads the missing connectTimeout parameter.
Where
LibsqlUrlParser lines 96 to 100.
if (queryParams.containsKey("connectTimeout") || queryParams.containsKey("socketTimeout")) {
connectTimeout = Duration.ofMillis(Long.parseLong(queryParams.get("connectTimeout")));
Long.parseLong(null) throws NumberFormatException, so the caller sees an unchecked exception instead of a SQLException. LibsqlClientConfig has no socket timeout field, so the parameter has nowhere to go today.
Repro
jdbc:libsql:http://localhost:8080/dev/tenant?socketTimeout=5000 through DriverManager.getConnection fails at parse time.
Scope
Add the failing test first and record the red run.
Take socketTimeout out of the guard so the parameter is ignored like any other unknown parameter.
If a socket timeout is wanted, file it as a feature with a field on LibsqlClientConfig. Do not map it onto the connect timeout.
Acceptance
A test covers socketTimeout alone and fails before the fix.
After the fix it either connects or fails with SQLException, never NumberFormatException.
Activity
test(jdbc): pin attached schema, date time, and savepoint edges (#215)
refactor(jdbc): split URL parsing into named steps (#229)