Closed
Description
Description/Steps to reproduce
When instantiating a Connector with settings including url and some other setting, the other settings are ignored.
Example of a test which wouldn't pass:
it('honours multiple user-defined settings', function() {
var urlOnly = {url: newConfig(true).url, max: 999};
var dataSource = new DataSource(connector, urlOnly);
var pool = dataSource.connector.pg;
pool.options.max.should.equal(999);
var clientConfig = dataSource.connector.clientConfig;
clientConfig.connectionString.should.equal(urlOnly.url);
});
Expected result
In this test, the max value in the pool should be 999 but it is at its default value of 10.
Additional information
I found where the problem come from:
In the case of an url, the entire clientConfig is replaced by an object with only the URL key
I think this is a problem because in 3.x, this case is handled and included in tests.