Skip to content

Merge caller JDBC Properties in createConnection#11773

Open
singhvishalkr wants to merge 1 commit intotestcontainers:mainfrom
singhvishalkr:fix-1537-jdbc-connection-info-properties
Open

Merge caller JDBC Properties in createConnection#11773
singhvishalkr wants to merge 1 commit intotestcontainers:mainfrom
singhvishalkr:fix-1537-jdbc-connection-info-properties

Conversation

@singhvishalkr
Copy link
Copy Markdown

What is the purpose of your change?

Hikari and other pools pass URL-level options through the \info\ map on \Driver.connect. Those entries must show up on the same \Properties\ instance we hand to the delegate driver, together with the container username and password.

Using
ew Properties(info)\ keeps caller keys on the defaults list. Drivers that only inspect the primary map (or build cache keys from \stringPropertyNames()\ without merging defaults the way you expect) effectively drop those options.

How does it work?

Start from an empty \Properties, \putAll\ the caller map when \info\ is non-null, then put \user\ and \password\ as today. Added a unit test with a mock \Driver\ that asserts a sample caller key is present in \stringPropertyNames()\ after the merge.

Fixes #1537.

Note: I could not run ./gradlew spotlessApply\ locally (no JDK in this environment). Please rely on CI for Spotless and the jdbc test task.

Made with Cursor

@singhvishalkr singhvishalkr requested a review from a team as a code owner May 9, 2026 11:43
Co-authored-by: Cursor <cursoragent@cursor.com>
@singhvishalkr singhvishalkr force-pushed the fix-1537-jdbc-connection-info-properties branch from ca2d159 to 304150d Compare May 9, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support hikari data-source-properties in ContainerDatabaseDriver

1 participant