createConnection() used 'new Properties(info)', which chains info as
*default* properties rather than copying its entries. Properties#getProperty()
consults defaults, but raw Hashtable-style access (get, entrySet, keySet) -
which many JDBC drivers use internally to enumerate connection args - does
not. As a result, properties supplied via Hikari's data-source-properties
(e.g. rewriteBatchedStatements, profileSQL) were silently dropped.
Switched to 'new Properties()' + 'putAll(info)' so info's entries become
real entries in the merged Properties object.
Fixes testcontainers#1537
Fixes #1537.
createConnection() used new Properties(info), which chains info as default properties rather than copying its entries. Properties#getProperty() consults defaults, but raw Hashtable-style access (get, entrySet, keySet) - which many JDBC drivers use internally to enumerate connection args - does not. As a result, properties supplied via Hikari's data-source-properties (e.g. rewriteBatchedStatements, profileSQL) were silently dropped, with the only workaround being to stuff them into the JDBC URL query string instead.
Fix: switched to new Properties() + properties.putAll(info) so info's entries become real entries in the merged Properties object rather than just a defaults fallback.
Added a unit test (JdbcDatabaseContainerTest) with a fake capturing Driver that asserts the properties are visible via raw Hashtable access, not just getProperty() - which is what would have masked this bug in the first place.