Skip to content

[DBCP-600] Honor positive sub-second validation timeouts - #548

Open
AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:DBCP-600-subsecond-timeout
Open

AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:DBCP-600-subsecond-timeout

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 18, 2026

Copy link
Copy Markdown

Summary

JDBC interprets a zero-second validation timeout as unlimited. A positive sub-second Duration currently truncates to zero, so validation can run without the requested bound.

Round positive sub-second values up to one JDBC second in both the validation-query and Connection.isValid paths. Preserve zero/negative values as the existing no-timeout behavior, document the conversion, add regressions for both paths, and add the DBCP-600 change entry.

Jira: https://issues.apache.org/jira/browse/DBCP-600

Validation

  • The validation-query regression failed on pristine base and passed with this patch.
  • Focused tests and mvn -q verify passed locally.
  • The default Maven build (mvn) passed locally on this exact tree, including a fresh run before publication.

Contributor checklist

  • Read the project contribution guidelines.
  • Read the ASF Generative Tooling Guidance.
  • AI assistance used: Kiro Opus 5.5 helped identify the defect, prepare code/tests/documentation, and perform an independent automated review. The Maven results above were checked locally.
  • Run the default Maven build.
  • Add unit tests for the behavioral change.
  • Explain the what, how, and why of the change.
  • Use a meaningful issue-linked commit subject and body.

Preserve positive sub-second validation bounds in both JDBC validation paths and cover them with regression tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant